Fixing bugs in fog reconnect and connection timeouts to fog due to inactivity.  Introducing a ping interval.