workflows: Holding Pen cache update

* Changes usage of Redis to use invenio.ext.cache to conform
  with cache usage elsewhere in Invenio.

* Removes duplicate code and restructures code with focus on
  clean code.

* Adds a new get_workflow_name() function to BibWorkflowObject.

* Changes the __all__ variable to a tuple.

* Updates bundles to remove unused and duplicate JS.

* Adds missing dataTables import in main table template.

* Simplifies the tags session handling.

* Fixes `BibWorkflowObject.add_task_results` calls outside workflows.

Reported-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: add_task_results hotfix

* Hotfixes BibWorkflowObject.add_task_results() that caused a test
  to fail.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
deposit: fix init plupload arguments

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
workflows: cascading deletion

* NOTE Adds cascading deletion of BibWorkflowObjects and logs when
  deleting a Workflow.

* Takes advantage of the cascading deletes in test tearDown
  functions - removing the unneeded test_teardown() function.

Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
base: global index run during demo site population

* Adds missing global indexing process that must be run
  during demo site population.  This is necessary after
  the merge of the virtual index facility from master.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
deposit: fix plupload config usage

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
search: fix jrec handling

* Fixes incorect handling of 'jrec' attribute together with pagination.
  (closes #1756)

Reported-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
search: fix advanced add to search form

* Adds missing class and fixes syntax error in generated javascript
  code.  (closes #1811)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
records: return cleaned record json

* NOTE `get_unique_record_json` returns cleaned data by
  `Record.dumps(clean=True)`.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
utils: function remove_underscore_keys removal

* Removes unused function `remove_underscore_keys`.

* Improves PEP8/257 and adds documentation entry.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
crossref: initial release of Flask extension

* Queries DOI record data from the database or CrossRef as JSON
  (closes #1906).

Signed-off-by: Pedro Gaudêncio <pedro.gaudencio@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
crossref: database search fix

* Adds an instance wide search parameter prefix to perform the database
  search.

* NOTE for the search to be performed in the database, the DOI field
  prefix for the corresponding instance config file should be added
  (e.g. CROSSREF_SEARCH_PREFIX = 'doi:').

Signed-off-by: Pedro Gaudêncio <pedro.gaudencio@cern.ch>
Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>
crossref: tests addition

* Adds tests for found and not found DOI.

Signed-off-by: Pedro Gaudêncio <pedro.gaudencio@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
crossref: docs entry addition

Signed-off-by: Pedro Gaudêncio <pedro.gaudencio@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
records: get_unique_record_json 'status' key move

* Moves `data['query']['status']` to `data['status']` in order to avoid
  collision with possible 'status' key in record object.

Signed-off-by: Pedro Gaudêncio <pedro.gaudencio@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
arxiv: fix 'status' key lookup

Co-authored-by: Pedro Gaudencio <pedro.gaudencio@cern.ch>
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
arxiv: fix database search with prefix

* Adds an instance wide search parameter prefix to perform the database
  search.

* NOTE: for the search to be performed in the database, the arXiv field
  prefix for the corresponding instance config file should be added to
  invenio.cfg as ARXIV_SEARCH_PREFIX
  (e.g. ARXIV_SEARCH_PREFIX = u'035__a:oai:arXiv.org:').

Signed-off-by: Pedro Gaudêncio <pedro.gaudencio@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
base: fix for recreation of broken links

* Fixes a crash of `inveniomanage collect` when a link for a static file
  exists but it is broken.

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
multimedia: initial release of Image API

* Introduces image API with `resize`, `crop`, `rotate`, `format` and `quality`
  functionality.

* Adds image cache object via redis.

* Adds API testsuite.

Signed-off-by: Harris Tzovanakis <drjova@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
multimedia: IIIF Image API addition

* Implements the IIIF Image API.

* NOTE For more info please read <http://iiif.io/api/image/2.0/>

Signed-off-by: Harris Tzovanakis <drjova@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>