transport: catch situation where session stopped during page/session setup. Issue #816
core: stop comet if websocket attaches. Issue #816: