BibFormat: fix snippets for phrase queries

* Displays correctly snippets for phrase queries.
* Corrects highlighting of only whole words.
  (closes #1201)

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

* maint-1.1:
  BibFormat: fix snippets for phrase queries
solrutils: add documentation

* Adds Solr documentation to the BibIndex and BibRank Admin Guides
solrutils: better invalid character handling

* Removes invalid characters (closes #1197)

* Consolidates removal of control characters
  and invalid characters

* Adds unit tests for character removal
solrutils: removal of unused code

* Search results are directly retrieved by opening a Solr URL
solrutils: better collection filter generator

* Empty filter gets accepted by Solr
solrutils: fix for ranking result display

* Passes jrec and rg for id output format
BibRank: detect external word similarity ranker

* Detects if Invenio uses external word similarity ranker
solrutils: add search and ranking tests

* Adds unit and regression tests for search and ranking

* Amends existing BibRank and WebSearch unit tests to only test
  native word similarity ranker

* Merge note: amended kwalitee in the following files:
    modules/miscutil/lib/solrutils_unit_tests.py
    modules/miscutil/lib/solrutils_regression_tests.py

Tested-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'master' into next

* master:
  solrutils: add search and ranking tests
  BibRank: detect external word similarity ranker
  solrutils: fix for ranking result display
  solrutils: better collection filter generator
  solrutils: removal of unused code
  solrutils: better invalid character handling
  solrutils: add documentation
  BibFormat: fix snippets for phrase queries
BibDocFile: support new magic library

* There are two flavours of the magic library (for file
  format guessing): the original bindings coming with the
  CLI file utilities, and the new python-magic bindings
  wrapping libmagic using ctypes. Support for the new
  library is here introduced (while still allowing for
  the old one).  (closes #1207)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebDeposit: file renaming and cleaning

* Fixes broken plugins logging.

* Removes unecessary error logging when trying to load
  plugins from `__init__`

Co-authored-by: Konstantinos Ntemagkos <konstantinos.ntemagkos@cern.ch>
Co-authored-by: Tibor Simko <tibor.simko@cern.ch>
WebDeposit: `db.func.max` call fix

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebMessage: blueprint name renaming
WebAccount: blueprint name renaming
WebGroup: blueprint name renaming
WebSearch: fix encoding and caching

Reported-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
WebStyle: fix POST request for mp_legacy_publisher
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  BibDocFile: support new magic library
Merge branch 'maint-1.1'

* maint-1.1:
  BibDocFile: support new magic library

Conflicts:
	modules/bibdocfile/lib/bibdocfile.py