WebSearch: better cleaning of word patterns

* Cleans word patterns of any trailing punctuation signs if they are
  followed by at least one space.  This is done for better consistency
  with what the indexer component does.

Reported-by: Alexander Wagner <a.wagner@fz-juelich.de>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: allow doctype renaming

* Implements the doctype renaming for a BibDoc.

* Fixes bibdocfile CLI action `--set-doctype`.  (closes #980)

Co-authored-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: implements format renaming

* Adds support in BibDoc for format renaming if the new format
  does not already exist among the latest files.  (closes #1318)

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

* maint-1.1:
  WebSearch: better cleaning of word patterns

Conflicts:
	modules/websearch/lib/search_engine.py
BibDocFile: fix for BibDocFile instantiation

* BibDocFile was recently refactored so that it no longer takes a
  doctype parameter on initialization.  However the function
  generic_path2bidocfile was still wrongly initializing BibDocFile
  with the this parameter.  This patch fixes the problem.
  (closes #1317)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
DocExtract: move mislabelled regression tests

* Moves mislabelled regression tests from unit test suite
  to regression test suite.  (closes #1309)

Co-authored-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: session_param_get() default value

* Optimises `session_param_get()` function to always return default value
  instead of raising KeyError exception when the given key is not found.
  (closes #1294)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: handling of exceptions in Md5Folder

* Improves handling of exceptions in Md5Folder by not causing automatic
  reload of md5 in case of Exceptions. (closes #1060)

* Additionally, always use register_exception(alert_admin=True) in case
  of MD5 related issues, as these are severe enough to call for further
  human check.

* Introduces Md5Folder regression tests.

Reported-by: Alessio Deiana <alessio.deiana@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.1'

* maint-1.1:
  BibDocFile: handling of exceptions in Md5Folder

Conflicts:
	modules/bibdocfile/lib/bibdocfile_regression_tests.py
Merge branch 'master' into next

* master:
  BibDocFile: handling of exceptions in Md5Folder
  WebSession: session_param_get() default value
  DocExtract: move mislabelled regression tests
  BibDocFile: fix for BibDocFile instantiation
  BibDocFile: implements format renaming
  BibDocFile: allow doctype renaming
  WebSearch: better cleaning of word patterns

Conflicts:
	modules/websession/lib/webuser.py