Continue sockjs timeout issue

Implement sessionClosed for BaseTransport instead of just XHR.

Check is the session is closed before handling any further.