Check if the object is still valid in the timeout callback function

When the SOL module in netipmid is busy, there is a chance that the
timeout callback function is executed after the context object is
destructed.  This will cause the process to crash with this error:

terminate called after throwing an instance of
'boost::wrapexcept<boost::asio::bad_executor>'
  what():  bad executor

The root cause is that the cancel() cannot cancel the expired callback
handlers. When the callback handler is executed, the object is deleted
already.

This uses proper reference counting on the objects captured in the
lambda so that they are not referencing memory that has already gone out
of scope.

Tested:
Decrease the accumulateInterval to 50ms for easy reproducing.
Run "ipmitool sel list", "ipmitool sensor list"
and "ipmitool sol looptest 200 500" at the same time,
no "sol looptest fail" error

Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Change-Id: I4b9e4ebce14ff5fca8e991aed96643186c9ea5d9
diff --git a/sol/sol_manager.hpp b/sol/sol_manager.hpp
index 86d24d5..caeaa39 100644
--- a/sol/sol_manager.hpp
+++ b/sol/sol_manager.hpp
@@ -38,7 +38,7 @@
     /** @brief SOL Payload Instance is the key for the map, the value is the
      *         SOL context.
      */
-    using SOLPayloadMap = std::map<Instance, std::unique_ptr<Context>>;
+    using SOLPayloadMap = std::map<Instance, std::shared_ptr<Context>>;
 
     Manager() = delete;
     ~Manager() = default;