Add support for AppendLimit and ReportUpdates

Added 2 new properties for Report interface: AppendLimit and
ReportUpdates. They were also added as arguments to the future version
of AddReport method of ReportManager.

ReportUpdates property defines the report update behavior:
- Overwrite: Each report update overrides previous "Readings" property.
  "AppendLimit" set by user is not respected - "Readings" property size
  is equal to count of all sensor across all metrics defined in report.
- AppendWrapsWhenFull: New readings are appended until limit specified
  by "AppendLimit" is reached. Then oldest readings are overwritten by
  new ones.
- AppendStopsWhenFull: New readings are appended until limit specified
  by "AppendLimit" is reached. Then updates are stopped.
- NewReport: not supported yet and will be implemented in the future.

Please note that if ReportingType is set to OnRequest, those 2 new
properties are ignored, and Readings property will contain one reading
per defined sensor, across all metrics. They are still stored, which
means that if ReportingType will be changed in the runtime, those
properties will be respected.

Tested:
- Both new properties can be accessed from dbus.
- Both properties are reflected in Readings property.
- Old AddReport method is working as before the change.
- UTs are passing.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I8a18f7e68215f0f6e5c403b533d2c4ff479df69e
diff --git a/src/report_factory.cpp b/src/report_factory.cpp
index 3d86521..6c61cbe 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -17,9 +17,11 @@
 {}
 
 std::unique_ptr<interfaces::Report> ReportFactory::make(
-    const std::string& name, const std::string& reportingType,
+    const std::string& name, const std::string& reportingTypeStr,
     bool emitsReadingsSignal, bool logToMetricReportsCollection,
-    Milliseconds period, interfaces::ReportManager& reportManager,
+    Milliseconds period, uint64_t appendLimit,
+    const std::string& reportUpdatesStr,
+    interfaces::ReportManager& reportManager,
     interfaces::JsonStorage& reportStorage,
     std::vector<LabeledMetricParameters> labeledMetricParams,
     bool enabled) const
@@ -39,10 +41,14 @@
                 std::make_unique<Clock>());
         });
 
-    return std::make_unique<Report>(
-        bus->get_io_context(), objServer, name, reportingType,
-        emitsReadingsSignal, logToMetricReportsCollection, period,
-        reportManager, reportStorage, std::move(metrics), enabled);
+    const ReportingType reportingType = stringToReportingType(reportingTypeStr);
+    const ReportUpdates reportUpdates = stringToReportUpdates(reportUpdatesStr);
+
+    return std::make_unique<Report>(bus->get_io_context(), objServer, name,
+                                    reportingType, emitsReadingsSignal,
+                                    logToMetricReportsCollection, period,
+                                    appendLimit, reportUpdates, reportManager,
+                                    reportStorage, std::move(metrics), enabled);
 }
 
 Sensors ReportFactory::getSensors(