Get the port from the server

Ask, don't tell, or something like that!

Now the WebSocketServer decides what port it will use and everything
else relies on that. By default an ephemeral port is used, but a fixed
port number can be passed in too.

This work is necessary to support Windows (#240) because on Windows a
TCP socket cannot be closed and immediately reopened, which we are doing
in the tests. So this change means that when restarting, a new ephemeral
port can be used by the server.