Implement NumericThreshold for Trigger

Implemented NumericThreshold for Trigger that allows to set
expected threshold value for collection of sensors and monitors
if this value is crossed. Implemented detection of direction
when threshold value is crossed. Added initial interface that
is used to commit an action when threshold value is crossed.
Moved Sensor Cache from Report Factory to Telemetry class, now
Sensor Cache is shared between Report Factory and Trigger Factory.
Moved fetching sensor from Dbus to seperate header to have single
implementation for factories.
Disabled tests that uses boost coroutine because of false positive
that is catched by address sanitizer.

Tested:
 - Passed unit tests
 - Built in yocto envrionment with success
 - Telemetry service started successfully in OpenBMC

Change-Id: I1ff7ab96174a27576786f0b9a71554fe1eeff436
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
diff --git a/src/report_factory.cpp b/src/report_factory.cpp
index b8b5518..2cd5da3 100644
--- a/src/report_factory.cpp
+++ b/src/report_factory.cpp
@@ -3,13 +3,15 @@
 #include "metric.hpp"
 #include "report.hpp"
 #include "sensor.hpp"
+#include "utils/dbus_mapper.hpp"
 #include "utils/transform.hpp"
 
 ReportFactory::ReportFactory(
     std::shared_ptr<sdbusplus::asio::connection> bus,
-    const std::shared_ptr<sdbusplus::asio::object_server>& objServer) :
+    const std::shared_ptr<sdbusplus::asio::object_server>& objServer,
+    SensorCache& sensorCache) :
     bus(std::move(bus)),
-    objServer(objServer)
+    objServer(objServer), sensorCache(sensorCache)
 {}
 
 std::unique_ptr<interfaces::Report> ReportFactory::make(
@@ -68,19 +70,7 @@
     boost::asio::yield_context& yield,
     const ReadingParameters& metricParams) const
 {
-    std::array<const char*, 1> interfaces = {
-        "xyz.openbmc_project.Sensor.Value"};
-    boost::system::error_code ec;
-
-    auto tree = bus->yield_method_call<std::vector<SensorTree>>(
-        yield, ec, "xyz.openbmc_project.ObjectMapper",
-        "/xyz/openbmc_project/object_mapper",
-        "xyz.openbmc_project.ObjectMapper", "GetSubTree",
-        "/xyz/openbmc_project/sensors", 2, interfaces);
-    if (ec)
-    {
-        throw std::runtime_error("Failed to query ObjectMapper!");
-    }
+    auto tree = utils::getSubTreeSensors(yield, bus);
 
     return utils::transform(metricParams, [&tree](const auto& item) {
         std::vector<LabeledSensorParameters> sensors;