tor: Clean up control command API

A lot of this API is really ugly. This makes it slightly less ugly.
Data replies are also handled correctly now, and error handling is
improved.
Merge pull request #67 from special/control-commands

Clean up Tor control command API