Add socket.io.js. Minor improvements and bugfixes