TachSensor: Accept PowerState from configuration

Accept the PowerState configuration parameter,
similar to other sensors.
This allows it to optionally be set to "Always",
while still preserving the default of "On".

Some systems have their chassis fans not tied to host power,
so they can continue working, even when host powered off,
and "Always" allows the BMC to continue to monitor them.

Tested: Without this patch, or set to "On",
the tachometers show RPM of 0,
even though the fans are still running correctly,
when host is powered off (but BMC and chassis fans
still have power). After this patch, and setting "Always",
the tachometers once again indicate proper RPM.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I1774f0bec180f52e18d37500fcdd87d32620d519
diff --git a/include/TachSensor.hpp b/include/TachSensor.hpp
index c91e21f..af39d0c 100644
--- a/include/TachSensor.hpp
+++ b/include/TachSensor.hpp
@@ -72,7 +72,8 @@
                boost::asio::io_service& io, const std::string& fanName,
                std::vector<thresholds::Threshold>&& thresholds,
                const std::string& sensorConfiguration,
-               const std::pair<size_t, size_t>& limits);
+               const std::pair<size_t, size_t>& limits,
+               const PowerState& powerState = PowerState::on);
     ~TachSensor();
 
   private: