Websockets

Added support for Websockets in lib, fixed a few issues with Sockets.
Also added a Websocket compatible version of the debugger.
Closes #206 
Closes #204