Abstract client port selection to the networkController.

Fix for #39.

Did some research and it turns out if you specify port 0 for your socket, the OS will automatically find any available port. I've made use of this so that the client doesn't have to worry about finding an available port.