Delay emission of InterfacesAdded

Make use of sdbusplus::server::object::object defered signal
emission feature so that only one InterfacesAdded signal is
emitted when creating objects.

Change-Id: I3f1668f8ea0565c7da74f750b0d4da677099924e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/thresholds.hpp b/thresholds.hpp
index 68d9422..6f7bef2 100644
--- a/thresholds.hpp
+++ b/thresholds.hpp
@@ -92,6 +92,8 @@
 auto addThreshold(const SensorSet::key_type& sensor,
                   int64_t value, ObjectInfo& info)
 {
+    static constexpr bool deferSignals = true;
+
     auto& bus = *std::get<sdbusplus::bus::bus*>(info);
     auto& objPath = std::get<std::string>(info);
     auto& obj = std::get<Object>(info);
@@ -100,7 +102,7 @@
     auto tHi = getEnv(Thresholds<T>::envHi, sensor);
     if (!tLo.empty() && !tHi.empty())
     {
-        iface = std::make_shared<T>(bus, objPath.c_str());
+        iface = std::make_shared<T>(bus, objPath.c_str(), deferSignals);
         auto lo = stoi(tLo);
         auto hi = stoi(tHi);
         (*iface.*Thresholds<T>::setLo)(lo);