Refactored socketio code and created server/sockets/ to prepare backbone.iobind support.
Refactored code attaching express session middleware.