fixed issue with invalid readings being visible

Before this change readings for sensors that are not yet available were
displayed as value 0.0 with timestamp 1970-01-01 which was meant to
represent invalid readings. This behaviour is undesired in case of
periodic report with appendLimit set. After this change invalid readings
are no longer visible.

Tested:
- Readings for sensors that is currently not available are not present
  on redfish.
- Confirmed in new unit tests that sensor readings can appear in any
  order. And produce correct results.

Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I340b85017530d120f2da2cc8ac4ae1840177e78c
diff --git a/src/metric.hpp b/src/metric.hpp
index b627b4e..8b367b3 100644
--- a/src/metric.hpp
+++ b/src/metric.hpp
@@ -20,7 +20,7 @@
 
     void initialize() override;
     void deinitialize() override;
-    std::vector<MetricValue> getReadings() const override;
+    const std::vector<MetricValue>& getUpdatedReadings() override;
     void sensorUpdated(interfaces::Sensor&, Milliseconds,
                        double value) override;
     LabeledMetricParameters dumpConfiguration() const override;