Improvements to the input and output queuing.
Improvements to the input and output queuing.

The output queue is now empty when gracefully shut down, so there's no point in
pickling it and it can be a simple, unmodified Queue.Queue. As for the input
queue, the mess continues... This version works not too bad, but still has
important conceptual shortcomings. I think I will move to something simpler.

Also fixed a couple of other bugs while working on this.

lucasmaystre/swim