sst: Rediscover profiles after host reboot

In some cases, host processor reboot may change the static SST-PP
profile information. This commit adds ability to register callbacks to
run upon hostState changes, and reruns SST discovery whenever the host
exits the power-off state.

Tested:
- Ran tools/sst-compare-redfish-os.py tool on platform with SPR host
  CPU, and observed no mismatches before and after a host reboot.
- Confirmed Redfish OperatingConfig properties still populated when host
  is off.

Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: I9e7b0ebb8c5ec7a8464346f3476490b765579428
diff --git a/include/cpuinfo_utils.hpp b/include/cpuinfo_utils.hpp
index 926c2d1..d57203b 100644
--- a/include/cpuinfo_utils.hpp
+++ b/include/cpuinfo_utils.hpp
@@ -47,6 +47,13 @@
  */
 void hostStateSetup(const std::shared_ptr<sdbusplus::asio::connection>& conn);
 
+/**
+ * Callback which is run whenever the HostState changes. First parameter is the
+ * old state, and second parameter is the new current state.
+ */
+using HostStateHandler = std::function<void(HostState, HostState)>;
+void addHostStateCallback(HostStateHandler cb);
+
 constexpr uint64_t bit(uint8_t index)
 {
     return (1ull << index);