mainloop: Make HwmonIO injectable dependency

HwmonIO was make into a interface object implementation.  This patch
transitions mainloop to receive a pointer to this interface to allow for
injection testing.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Iaa470fafccb42c4d7fbabac0dc92f96c8075faf2
diff --git a/readd.cpp b/readd.cpp
index 7ac95fc..cba043e 100644
--- a/readd.cpp
+++ b/readd.cpp
@@ -15,6 +15,7 @@
  */
 #include "config.h"
 
+#include "hwmonio.hpp"
 #include "mainloop.hpp"
 #include "sysfs.hpp"
 
@@ -77,8 +78,9 @@
                         "Unable to determine callout path.");
     }
 
+    hwmonio::HwmonIO io(path);
     MainLoop loop(sdbusplus::bus::new_default(), param, path, calloutPath,
-                  BUSNAME_PREFIX, SENSOR_ROOT);
+                  BUSNAME_PREFIX, SENSOR_ROOT, &io);
     loop.run();
 
     return 0;