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/src/ExitAirTempSensor.cpp b/src/ExitAirTempSensor.cpp
index 510e595..c7e6e8e 100644
--- a/src/ExitAirTempSensor.cpp
+++ b/src/ExitAirTempSensor.cpp
@@ -271,6 +271,7 @@
     }
     setInitialProperties(conn);
     setupMatches();
+    setupPowerMatch(conn);
 }
 
 ExitAirTempSensor::~ExitAirTempSensor()
@@ -351,7 +352,7 @@
     }
 
     // if fans are off, just make the exit temp equal to inlet
-    if (!isPowerOn(dbusConnection))
+    if (!isPowerOn())
     {
         val = inletTemp;
         return true;