Torrents support

This PR is intended to do a final checkup on all changes pertaining to torrents before merging it into dev.
Obviously we aren't finished, some features are missing and some things we should have done differently.

One thing I particularly dislike is the torrent proxies remembering authentication state. I rather have a Connection class that contains that state and caching as well. This would also better allow callback logic, like the Deluge daemon rpc has.
But it would be a significant undertaking to make that a reality, so i'll settle for "good enough". Once everything is in dev or even master, we can look at implementing Connection state.

Feel free to comment on anything you like.
Good idea.