celery: test case helper

* Adds testcase class helper for easier testing of Celery tasks. The
  helper will create a new Celery application per test, similar to the
  way InvenioTestCase creates a Flask application per test.

* Adds example test case using the new helper.

* Removes no longer needed test runner hack.

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

* Refactors register_exception to use Flask application
  logging, and split functionality into a Python logging
  handler and formatter.

* Adds support for logging exceptions to Sentry.

* Disables email error reporting when in debug mode.

* Deprecates certain error logging function by moving them
  to the module where they are used. This is done to create
  a much simpler API.

* Fixes PEP8 errors.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
login: fix permission issue for guest user

* Fixes a permission issue where a guest user did not have a list of
  permitted restricted collections calculated, causing issue with
  e.g. facets when viewing restricted collections (e.g. restricted to
  role anyuser).
communities: hide search (ZENODO only)
deposit: edit button now shown fix

* Fixes Edit button not displayed.

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

* Improves error reporting for bibformat elements to include
  traceback in template when in debug mode, as well as using
  the Flask application logger to report the error.

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

* Refactors warnings reporting to use logging system by
  default.

* Adds best practice error handling documentation.

* Adds StreamHandler to warnings logger in debug mode.

* Unhides DeprecationWarning.

* Adds support for sending warnings to Sentry.

* Removes custom warnings wrapper.

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