BibEdit: change cache folder

* Changes from tmp-shared to tmp-shared/bibedit-cache

Conflicts:

	Makefile.am
BibEdit: avoid sync request to see if record has pdf
BibEdit: save changes periodically

* Saves changes to server periodically (frequency can be
  configured) in bulk and asynchronously to avoid slowing
  down client.
BibEdit: add direct link to dx.doi.org

* New icon to search for DOI on the dx.doi.org page,
  if the DOI is found it opens the page on new tab

* Fixes the border of textareas (right border was invisible)
BibEdit: sort HoldingPen changes alphabetically

* Orders the subfields from the holding pen entry
  alphabetically before making the comparison with the
  current record
BibEdit: add version to bibedit css name

* Prevents browser from caching the css file if it has
  changed on disk
BibEdit: use perform_request_search on search

* search box now uses perform_request_search instead of
  search_pattern
BibEdit: refactoring and fixes

* Refactoring of functions related to editable area change

* Sets max characters on fields/subfields

* Avoids double bind of editable area. Was causing troubles.

* Fix bug in field tag modification undo

* Fix switch to write mode

* Fix merge with template. Record was not being ordered after
  merging with template, so operations on the recstruct where
  not being done correctly

* Change in css to always display scrollbar in webkit-based
  browsers.
BibEdit: fix perform_doi_search function

* Adds 'User-Agent' to the headers send within the
  perform_doi_search function

* Adds CFG_DOI_USER_AGENT to the bibedit_config file

* Adds CookieJar to store cookies on the pages redirected
  from the dx.doi.org

* Adds unittests for the perform_doi_search function

Reviewed-by: Javier Martin Montull <jmartinm@cern.ch>
Merge branch 'master' into next

* master:
  BibEdit: fix perform_doi_search function
  BibEdit: refactoring and fixes
  BibEdit: use perform_request_search on search
  BibEdit: add version to bibedit css name
  BibEdit: sort HoldingPen changes alphabetically
  BibEdit: add direct link to dx.doi.org
  BibEdit: save changes periodically
  BibEdit: avoid sync request to see if record has pdf
  BibEdit: change cache folder
inveniocfg: tests runner file closure fix

* Fixes "I/O operation on closed file" when running
  inveniocfg_unit_tests.py due to logging trying to cleanup
  a closed StringIO.  (closes #1327)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.1'

* maint-1.1:
  inveniocfg: tests runner file closure fix
BibFormat: additional fulltext file display in HB

* Improves display of Additional files in the default HB format
  displaying the link "(additional files)".  (closes #1219)

Reported-by: Devin Bougie <devin.bougie@cornell.edu>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebStyle: new config option CFG_SITE_SECRET_KEY

* Adds CFG_SITE_SECRET_KEY to set the Flask config variable
  SECRET_KEY on a per-site base. The variable should be used to
  e.g. protect against cross-site request forgery.

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebStyle: check empty variable CFG_SITE_SECRET_KEY
WTForms: config option CFG_SITE_SECRET_KEY usage

* Uses CFG_SITE_SECRET_KEY as SECRET_KEY in SessionSecureForm.
WebStyle: catch HTTPS redirects in debug toolbar

* Move loading of Flask Debug Toolbar just before SSLify to
  catch HTTPS redirects.

* FIXME flask_sslify should work in debug mode as well. (see #1325)

Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>
inveniocfg: --create-secret-key addition
WebStyle: fix redirects from mp_legacy_publisher

* Uses same exception code handling for invenio_handler and
  mp_legacy_publisher. (closes #1335)

Reported-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
WebSearch: fix access to restricted records

* Adds check if user can see the record before any '/record' page is
  displayed.  (closes: #1340)

* Adds method `is_super_admin` to check if `current_user` is super
  admin.

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