Add ACCOUNTS_LOADED plugin hook, support OAuth2 authentication

* In preparation for GNOME Online Accounts Plugin
* Partially fixes #46