Make socket.io regular dependency
Add more tests for socket.io adapter

Also fix some bugs.