manager: add status

Add a status field to assist keeping track of manager state.

STARTING - the manager is initializing
RUNNING - the manager event loop is running
STOPPING - the manager is shutting down

Remove the old _shutdown property and make use of _status == (or !=) STOPPING.

Change-Id: I8326cb164aba32f2d64bbf4fa0753932821571ff
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/manager.hpp b/manager.hpp
index 3046024..ab1133c 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -183,9 +183,6 @@
                           ObjectReferences::iterator pos, bool emitSignals,
                           bool restoreFromCache);
 
-    /** @brief Provided for testing only. */
-    volatile bool _shutdown;
-
     /** @brief Path prefix applied to any relative paths. */
     const char* _root;
 
@@ -214,6 +211,9 @@
 #ifdef CREATE_ASSOCIATIONS
     associations::Manager _associations;
 #endif
+
+    /** @brief Manager status indicator */
+    volatile enum class ManagerStatus { STARTING, RUNNING, STOPPING } _status;
 };
 
 } // namespace manager