restful: API testcase fixes

* Fixes issue with class variable in API test case.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
restful: decorators test cases

* Adds test cases for restful decorators.

* Adds documentation on issues with decorators being called with
  both bound and unbound methods when used from Flask-Restful
  method_decorators attribute (bound) vs normally applied
  decorator (via @ on class method).

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: record merge fix

* Fixes issue where edited records would be rejected by bibupload's
  revision verifier because the modification date in bibrec (used
  by records module) is not the same as hstRECORD (used by revision
  verifier).

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
oauthclient: github/orcid sign-in/up support

* Adds support for GitHub and ORCID sign-in/up.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
oauth2server: scopes registry

* Adds registry for OAuth 2.0 scopes.

* Adds support for selecting scopes when creating personal access
  tokens.

* Fixes scopes registration in deposit and webhooks modules according to
  new registry.

* NOTE The scopes registry will be refactored in the future depending on
  the outcome RFC #1773.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
oauth2server: authorization flow bug fixes

* Adds redirect URI field to application form.

* Adds validation and setters of redirect uris on model.

* Fixes issue in auth flow when validating scopes.

* Fixes template and context issues in 'Authorize application' view.

* Disables https redirect uri checking when in debug mode.

* NOTE Fixes auth flow issue by changing default value for
  Client.is_confidential. Upgrade included to update existing
  applications.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
restful: API keys fix

* Fixes undefined variable when using API keys as authentication.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>