Remove an unnecessary argument from the Makefile
DB Connection State

Add a connection state member variable to the database class.
Connected State

* Use the connection state variable to ensure db connectivity and
provide reconnect capabilities.
* Space ->TAB fixes.
* Unlock mutexes for failed inits.
Query Connection State Checks

Check for connection state and reconnect when necessary.