Clean up power state handling and fix voltage events

Seperate isPowerOn into two functions, one to set up the
match and one to poll the boolean. This way a dbus connection
object isn't needed in the sensor. Use this new function to
allow the ADCSensor to only signal threshold crosses if the
sensor is in the correct state.

Tested-by: Verified no SEL events for ADC sensors were created
during power cycling.

Change-Id: Ida800ab478b85ac2cb5976fa3471411c5d4bdc88
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/Utils.hpp b/include/Utils.hpp
index f5f9341..933d5f6 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -34,7 +34,8 @@
                const std::string& matchString,
                std::vector<std::experimental::filesystem::path>& foundPaths,
                unsigned int symlinkDepth = 1);
-bool isPowerOn(const std::shared_ptr<sdbusplus::asio::connection>& conn);
+bool isPowerOn(void);
+void setupPowerMatch(const std::shared_ptr<sdbusplus::asio::connection>& conn);
 bool getSensorConfiguration(
     const std::string& type,
     const std::shared_ptr<sdbusplus::asio::connection>& dbusConnection,