Add a task for running commands

This adds a helper task for running commands asynchronously, registering
callbacks for stdout, stderr, and process termination.

It uses Twisted, and the callbacks are executed in the context
of the ioloop, so you have to be careful not to block in there.  Though,
this could be mitigated by using reactor.callInThread, I am not sure if
it's worth it.

Technically, this fixes #38