Addition to the last commit:

Setting up HttpServer now waits until the selector has been opened. This should prevent the websocket test case failing sometimes (because the thread is started later than the client connect sometimes