Threaded server, implementation now in main class

The WebSocket server is now threaded with an interfacing implementation
inside the main class. This allows enough abstraction of the server to
implement other logic.
Support for writing data to socket outside thread

The method `send_data(message)` can now be called from outside the
threaded server (from the main class) to send data directly into the
web socket.