Make the dbushelper own its own bus handle.

The dbushelper implements an interface that should not be sdbusplus
specific. By making the implementation own the sdbusplus aspects, an
alternate implementation can be swapped in.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I4109772499421e2e6497a0fcad663ebbd1210a7c
diff --git a/dbus/dbusactiveread.hpp b/dbus/dbusactiveread.hpp
index 39640cc..8f92cb4 100644
--- a/dbus/dbusactiveread.hpp
+++ b/dbus/dbusactiveread.hpp
@@ -20,9 +20,10 @@
 {
   public:
     DbusActiveRead(sdbusplus::bus::bus& bus, const std::string& path,
-                   const std::string& service, DbusHelperInterface* helper) :
+                   const std::string& service,
+                   std::unique_ptr<DbusHelperInterface> helper) :
         ReadInterface(),
-        _bus(bus), _path(path), _service(service), _helper(helper)
+        _bus(bus), _path(path), _service(service), _helper(std::move(helper))
     {}
 
     ReadReturn read(void) override;
@@ -31,7 +32,7 @@
     sdbusplus::bus::bus& _bus;
     const std::string _path;
     const std::string _service; // the sensor service.
-    DbusHelperInterface* _helper;
+    std::unique_ptr<DbusHelperInterface> _helper;
 };
 
 } // namespace pid_control