Add automatic login for local Deluge instances
Add automatic login for local Deluge instances

Encapsulated the logic for local Deluge instance automatic login into separate LocalDelugeRPCClient class.
This will allow easy maintenance/refactoring or removal in the future.
Code was back-ported from https://github.com/CouchPotato/CouchPotatoServer/tree/master/libs/synchronousdeluge
Made some changes: better error handling and support for Python 3.
JohnDoee/deluge-client