Add support for hard and soft shutdown thresholds

Add support for the new SoftShutdown and HardShutdown sensor threshold
D-Bus interfaces.  These are optional, so if they aren't in the JSON
config file then the code won't put them on D-Bus.

At least one of the low or high values needs to be in the JSON for the
interface to be created.  If there is only one, then NaN will be used
for the missing threshold value to indicate 'not applicable' as the
phosphor-dbus-interfaces yaml definition states.

Since these new interfaces are optional, they cannot be base classes of
the VirtualSensor class as the other threshold interface classes were,
so they are members of the class instead.  To keep all of the threshold
classes consistent, the warning and critical threshold objects were also
changed to be members.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I099f83ca085e7febd4416c581a19716a83c9d133
2 files changed