Make specific UNA sensors not trigger failsafe

By convention, sensors at some states like 'not present',
'power state not matching' are marked as 'unavailable' on dbus.
At such states, some specific sensors should not be considered as
failed and trigger pid 'failsafe'.

A typical example is when a system is powered-off, its CPU/DIMM temp
sensors are 'unavailable', these sensors should not be treated as
'failed' and trigger pid 'failsafe'. This is necessary for systems
whose Fans will keep working when the CPU is off.

This feature is configurable per sensor (valid on thermal sensors). It
can be enabled by setting the Pid controller option
"InputUnavailableAsFailed" to 'false' when one configuring the PID module
via entity-manager, or by setting the sensor option "unavailableAsFailed"
to 'false' when one configuring the PID module via JSON. (These options are
optional and default to 'true')

Tested:
1. On a Fan 'always-on' system, enabale this feature on CPU temp sensors,
poweroff the system, 'unavailable' CPU temp sensors do not trigger the
failsafe mode.
2. 'Unavailable' Fans still trigger the failsafe mode.
3. 'Unfunctional' or 'failed' sensors still trigger the failsafe mode.

Signed-off-by: Zheng Song <zheng.song@intel.com>
Change-Id: I1dd1d76466f43e7dcf51c161c96714f1bcfae88d
diff --git a/dbus/dbuspassive.hpp b/dbus/dbuspassive.hpp
index 346986b..bc16719 100644
--- a/dbus/dbuspassive.hpp
+++ b/dbus/dbuspassive.hpp
@@ -61,6 +61,7 @@
 
     void setFailed(bool value);
     void setFunctional(bool value);
+    void setAvailable(bool value);
 
     int64_t getScale(void);
     std::string getID(void);
@@ -79,8 +80,11 @@
     double _min = 0;
     bool _failed = false;
     bool _functional = true;
+    bool _available = true;
+    bool _unavailableAsFailed = true;
 
     bool _typeMargin = false;
+    bool _typeFan = false;
     bool _badReading = false;
     bool _marginHot = false;