Coding style: fix indents
thresholds: Log the current value of a DS value when generating an OKAY notification
thresholds: Fix calculation of hysteresis

The old code would never emit a notification when the value changed between the
WARNING and FAILURE; the reason was that each branch in the switch statement
only checked the "old" thresholds valid for the previously encountered state.
That is wrong and pretty dangerous, as there will be no notification when a
values progresses slowly from OK to WARN to FAIL.

Fixes #578.
Merge pull request #581 from jktjkt/hysteresis

Fix transitions between FAILURE and WARNING when using option Hysteresis in Thresholds