Added support for Enabled property

Enabled property is added so that user can select via dbus interface if
Readings are updated and signal on Readings update is emitted, moreover
Metric calculation on received sensor data is active only when Enabled
is set to true

Tested:
- New unit tests were created, ran all new and previous UTs, all passed
- Tested under QEMU by adding reports for single and multiple sensors,
  changing Enabled property and emitting signal of value change for
  sensors added into the report, checking if Readings is accordingly
  updated or not updated
- Verified persistency, if Enabled property is successfully stored and
  restored after Telemetry service restart and also checked if after the
  restart dependencies of Enabled (Readings, Metric calculation) are
  properly initiated

Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
Change-Id: I29cf13693a48d15cb16d2ad6707f483f67f4879b
diff --git a/src/metric.cpp b/src/metric.cpp
index 04d3fe9..4290293 100644
--- a/src/metric.cpp
+++ b/src/metric.cpp
@@ -141,10 +141,17 @@
     }
 }
 
+void Metric::deinitialize()
+{
+    for (const auto& sensor : sensors)
+    {
+        sensor->unregisterFromUpdates(weak_from_this());
+    }
+}
+
 std::vector<MetricValue> Metric::getReadings() const
 {
     const auto timestamp = clock->timestamp();
-
     auto resultReadings = readings;
 
     for (size_t i = 0; i < resultReadings.size(); ++i)