Added connection watchdog

Added mechanism for automatically detecting dysfunctional connections.
Reconnection attempts will be made with a gradually increasing interval
capped at 30 minutes.