Let PowerState class run multiple callbacks

Previously the PowerState class could only handle a single callback
function.  This commit changes that to allow other callback functions to
be added with a addCallback() method.  The callback functions are then
executed when the power state changes.

This also changes the use of the PowerState object in the fan presence
code to a shared_ptr instead of a unique_ptr, and adds a function to
return the PowerState object to use in the app, creating it if
necessary.  This allows multiple pieces of the code to add their own
callbacks to the same object.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I35fc8ab94c4806f0c7fd2f1552c58131b8f30f23
diff --git a/presence/error_reporter.hpp b/presence/error_reporter.hpp
index a6a86fe..a8c9d6f 100644
--- a/presence/error_reporter.hpp
+++ b/presence/error_reporter.hpp
@@ -104,7 +104,7 @@
     /**
      * @brief Base class pointer to the power state implementation.
      */
-    std::unique_ptr<PowerState> _powerState;
+    std::shared_ptr<PowerState> _powerState;
 
     /**
      * @brief The map of fan paths to their presence states.