add json config and implementation for hysteresis

Add the json config for health metric hysteresis and implementation
logic for it. Update the health metric config test to validate the
hysteresis value.

Change-Id: I60c0daa601abee9ac1916581d23257cc04128dd0
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/health_metric.cpp b/health_metric.cpp
index 2f23394..2887766 100644
--- a/health_metric.cpp
+++ b/health_metric.cpp
@@ -13,8 +13,6 @@
 
 using association_t = std::tuple<std::string, std::string, std::string>;
 
-static constexpr double hysteresis = 1.0;
-
 auto HealthMetric::getPath(MType type, std::string name, SubType subType)
     -> std::string
 {
@@ -216,7 +214,7 @@
     }
     auto changed = std::abs((value.current - lastNotifiedValue) /
                             lastNotifiedValue * 100.0);
-    if (changed >= hysteresis)
+    if (changed >= config.hysteresis)
     {
         lastNotifiedValue = value.current;
         return true;