errorlib: context support in sentry

* Introduces support for HTTP, and user context in sentry, by
  exploiting information provided in req object when available.
  (closes #1960) (PR #2147)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: kwalitee fix

* Runs `autopep8` on `websearch_services_regression_tests.py`.
  (PR #2352)

Signed-off-by: Federico Poli <federico.poli@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: new Journal Hint Service

* Adds the Journal Hint Service, that displays
  'Were you looking for a journal reference? Try: <link>'
  when the user search for a raw journal reference.
  (PR #2352)

* Adds unit and regression tests for the new search service.

* Adds two unit tests to `search_from_reference`, just to be sure that
  it accepts unicode.

Signed-off-by: Federico Poli <federico.poli@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: smarter journal hint

* Improves the JournalHintService implementation by directly
  a brief representation of a record when one is found.
  (PR #2352)

* Additionally, suggests to use find rawref "foo" when "foo"
  is searched for, rather than journal:"bar".

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibSort: improved washers

* Improves speed and realiability of BibSort washers by properly
  exploiting textutils.decode_to_unicode() and
  textutils.translate_to_ascii() functions.
  (PR #2283)

* Improves speed of textutils.translate_to_ascii().
  (addresses #1754)

* Introduces new washer
  _sort_nosymbols_case_insensitive_strip_accents().

* Makes unidecode dependency mandatory.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: bibdocfile.BibDoc memory fix

* Fixes a memory leak in BibDocFile module where BibDoc instances were
  referring to BibDocFiles and viceversa, by using weakref.ref().
  (closes #2082) (PR #2136)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reported-by: Thorsten Schwander <thorsten.schwander@gmail.com>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
DocExtract: preload kbs on wsgi load

Co-authored-by: Alessio Deiana <alessio.deiana@cern.ch>
Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
PdfChecker: skip records without unique ids in 037 tags
WebSearch: add more info on verbose output
BibIndex: special journal page handling

* Improves the standard Journal tokenizer to keep page-end
  when indexing, as well as adding new journal,volume pairs.

* Amends the search_engine to specially handle searches in
  the journal field with page ranges to make use of the new
  tokenized strings. This fixes issues seen in BibRank and
  other search engine clients that passes a valid full page
  range and obtains no result (because it was not indexed!).

Co-authored-by: Alessio Deiana <alessio.deiana@cern.ch>
WebSearch: special journal search fallback

* For certain journal search queries with INSPIRE style page
  ranges the user is now presented with an alternative
  result without the page-end part of the query, should the
  original query return no results.

Co-authored-by: Alessio Deiana <alessio.deiana@cern.ch>
BibCheck: improvements in DOI checks

* Sends only start page to crossref, not the range
BibAuthorID: hotfix in author-hepnames connection

* Session is now correctly initialized before use.
BibAuthorID: fix in WAPAFF format

* Now handles correctly repeatable affiliations
BibCheck: add $$9 bibcheck to dois added
BibAuthorID: javascript ticket system optimization

* Optimised ticketing system sync, significantly reduces server polling load.
datacher: minimum caching time

* Introduces a new parameter in the datacacher that defaults to 30s.
  This is the mininum time the data is cached. That means that calling
  recreate_cache_if_needed() does nothing if it was called less than 30s ago.
BibRank: details citations diff

* When bibrank -w citation fails because we lost too many citations,
  displays in the log for each record how many citations they lost.
BibIndex: bibauthorid performance improvements

* Re-implements get_author_canonical_ids_for_recid() to bypass
  complex BibAuthorID API usage and directly retrieve data
  from the DB for a gain of speed of ~800x.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Co-authored-by: Alessio Deiana <alessio.deiana@cern.ch>
Co-authored-by: Samuele Carli <samuele.carli@cern.ch>
BibEdit: holdingPen fix

*  When merging a record with a template, if the record is a hp record
   make all its subfields volatile.

Reviewed-by: Javier Martin Montull <javier.martin.montull@cern.ch>