Many Changes (because I'm the only one using this)

1. Factor out subprocess code. This means that a PipeSink can also be a
PipeWriter
2. Fix some bugs.
3. Use an actual queue in the manager (I have no idea what I was
thinking when I implemented that...).
4. Get things to shutdown properly (now, hitting ctrl-c shutd everything
down nicely).