CMS-2027 Implement Lost Connection Detection mechanism

Added new TS class LostConnectionDetector, events to notify about connection state.

If connection state changes all applications are notified using
corresponding events now.