Big refactoring of REST API layer:
* Requirement of interactive oauth2 authentication (login form) now leads to auth failure instead of hanging "forever".
* Request preparing, error handling and retrying logic became more consistent.
* Added support for runtime modification of API options (host, protocol etc.)
* Futurized most of methods.