Fixed handling maxAppendLimit

maxLimit prevented using numeric_limits<uint64_t>::max as a way to let
telemetry service deduce appendLimit. This commit fixes constrain to
allow passing this special value.

Tested:
  - Added new unit tests that confirm numeric_limits<uint64_t>::max is
    correctly handled in telemetry service

Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I5d67e83475cdfcbb58a71b783ac9eef1e5ad7010
diff --git a/src/report.hpp b/src/report.hpp
index 880ede7..98097ae 100644
--- a/src/report.hpp
+++ b/src/report.hpp
@@ -54,7 +54,8 @@
     std::unique_ptr<sdbusplus::asio::dbus_interface> makeReportInterface();
     static void timerProc(boost::system::error_code, Report& self);
     void scheduleTimer(Milliseconds interval);
-    uint64_t deduceAppendLimit(const uint64_t appendLimitIn) const;
+    std::optional<uint64_t>
+        deduceAppendLimit(const uint64_t appendLimitIn) const;
     uint64_t deduceBufferSize(const ReportUpdates reportUpdatesIn,
                               const ReportingType reportingTypeIn) const;
     void setReportUpdates(const ReportUpdates newReportUpdates);
@@ -71,7 +72,7 @@
     ReadingParameters readingParameters;
     bool persistency = false;
     uint64_t sensorCount;
-    uint64_t appendLimit;
+    std::optional<uint64_t> appendLimit;
     ReportUpdates reportUpdates;
     CircularVector<ReadingData> readingsBuffer;
     Readings readings = {};