Added a socket service

Now we have a socket service to use, instead of directly relying on socket.io.

Merge #19 first.