Added support for listening to 'socket' and 'endpoint' events to SocketManager and converted the socket state syncing to use the events.
Reduced the scope of socket locking to ignore simple reading of messages or heartbeats.
Fixed to work wit the XHR polling transport.
Some initial work on the mixing to work with the new code.