multi-threaded ws interface

This might still be iffy. I'm not 100% sure we are race-free in the ws library.
This is also dedicating separate threads to serving the ws interface. It's not the smartest way to run things. We should really build the ws services into the co-op scheduler, but the loss is only in efficiency.