Allow socket.io in sails support custom on connection logic 

Similar as authorization, this changes is to extend onConnection of
socket.io in sails to support custom logic.