First attempt at making the server multithreaded

Inspiration from http://stackoverflow.com/a/5054851

Still get problems with pipes not disposing properly... that will get fixed next, with a multithreaded client test