control: Add 'events' section to dump

Add an events section to the fan control dump that contains all of the
configured events with their contained action and group names.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8e9fa9ce975ac30837b0842908faeb63ddc31e2a
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index c9d679f..9129750 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -156,6 +156,10 @@
         std::visit([&obj = parameters[name]](auto&& val) { obj = val; }, value);
     }
 
+    std::for_each(_events.begin(), _events.end(), [&data](const auto& event) {
+        data["events"][event.second->getName()] = event.second->dump();
+    });
+
     data["services"] = _servTree;
 }