core: new state machine for maintaining websocket/comet push connections.
Perpetual comet loop which only polls if there is no active websocket connection.
Websocket connection checks with a periodic ping/pong if the connection works.