control: Dump flight recorder to a JSON file

A future commit will dump more debug data as opposed to just the flight
recorder.  To better support the data all being in the same file, it
will be a JSON file.  The first step of that is to write the flight
recorder output to a JSON file.

This also reorganizes the Manager code that does it to prepare for
different data also being in the same file.

An example is:
{
    "flight_recorder": [
        "Oct 06 05:59:01.183998: main: Startup"
    ]
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iaeb55ffde3a30c2345968e1b3fad313b50aff331
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index 86e47dd..92f837e 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -479,6 +479,9 @@
         _parameters.erase(name);
     }
 
+    /* The name of the dump file */
+    static const std::string dumpFile;
+
   private:
     /* The sdbusplus bus object to use */
     sdbusplus::bus::bus& _bus;
@@ -525,9 +528,9 @@
     /* List of events configured */
     std::map<configKey, std::unique_ptr<Event>> _events;
 
-    /* The sdeventplus wrapper around sd_event_add_defer to dump the
-     * flight recorder from the event loop after the USR1 signal.  */
-    std::unique_ptr<sdeventplus::source::Defer> _flightRecEventSource;
+    /* The sdeventplus wrapper around sd_event_add_defer to dump debug
+     * data from the event loop after the USR1 signal.  */
+    std::unique_ptr<sdeventplus::source::Defer> debugDumpEventSource;
 
     /**
      * @brief A map of parameter names and values that are something
@@ -581,9 +584,9 @@
     void setProfiles();
 
     /**
-     * @brief Callback from _flightRecEventSource to dump the flight recorder
+     * @brief Callback from debugDumpEventSource to dump debug data
      */
-    void dumpFlightRecorder(sdeventplus::source::EventBase&);
+    void dumpDebugData(sdeventplus::source::EventBase&);
 };
 
 } // namespace phosphor::fan::control::json