CMS-2027 Implement Lost Connection Detection mechanism

Added new TS class LostConnectionDetector, events to notify about connection state.

If connection state changes all applications could add listener
to AppBridge to be notified about it.
Merge pull request #352 from enonic/CMS-2027

CMS-2027 Implement Lost Connection Detection mechanism