template: @template_args decorator addition

* Adds new decorator to allow overwritting template context functions by
  endpoint.  (closes #2009)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
general: defaultdict fix

* Replaces defaultdict with collections.defaultdict.  (addresses #2030)

Signed-off-by: Eirini Psallida <eirini.psallida@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
messages: require.js messages

* Refactors the messages/add template to use require.js.

* Loads jQuery UI modules individually.

* Fixes the jquery timepicker add-on shim.

* Moves bootstrap.js back into jquery bundle.

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>
base: bundles documentation

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>
installation: flask-oauthlib upgrade to 0.6

* Changes the setup file so flask-oauthlib
  will be the latest version, that is 0.6.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
oauth2server: oauth2server improvements

* Removes the oauth parameter from some functions.

* Adds '/' to the endpoints that need it in the test_provider.

* Changes some 403 to 401 in the test_provider.

* Uses the url_for in some functions in helpers testsuite
  in order to hard-code the url.

* Tests the test_provider case

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
restful: decorator improvement

* Improves require_api_auth decorator by clearing the session
  and returning the response at the end.

* Removes the bound_instance_ parameter, removes the
  require.oauth from the return statement and the returned
  function now contains only the *args and the **kwargs.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>

restful: decorator improvement

* Improves the require_api_auth decorator by clearing
  the session and returning the response at the end.

* Removes the bound_instance_ parameter, removes the
  request.oauth from the return statement and the
  function returned now contains only *args and **kwargs.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>

restful: decorator improvement

* The require_api_auth now calls the require_auth method
  from flask-oauthlib.

* Removes oauth parameter from require_oauth_scope method and
  replaces it with request.oauth.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
documents: documents REST API changes

* Removes oauth parameter from REST API functions.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
deposit: deposit REST API changes

* Removes oauth parameter from REST API functions.
* Adds base_url to a test_registration.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
tags: API and REST API fixes

* Removes oauth parameter from REST API methods.

* Ensures tests are run OK.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>

tags: API and REST API fixes

* Removes oauth parameter from REST API methods.
* Adds a uid parameter to the method that attaches
  tags to records.
* Ensures tests are run OK.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>