BibDocFile: better JS washing in web UI

* Better clean values in File Management Interface, prior to using
  them as JavaScript strings.

* Escape document type and descriptions for HTML.

* Moved most JavaScript parameters out of 'onclick' attribute,
  in order to preserve double-quotes (instead of required
  transformation to &quot;).

* Some issue  still exists for filenames with line feeds (\n) or
  carriage returns (\r), as browsers will transform these values
  into \r\n, making it impossible to match the corresponding bibdoc.
  One would have to change the code to rely on some bibdoc ID instead
  of bibdocname to match bibdocs.

* Also escaped docnames in /files tab.

* Also prevent use of forbidden chars when renaming a file.

Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: display file upload progress

* File managemenent interface displays progress of the upload, in
  browsers that supports XMLHttpRequest Level 2. For others, the
  progress bar is replaced with a rotating indicator. When the
  file management interface is not used in asynchrounous upload
  mode (eg. in WebSubmit function 'Create_Upload_Files_Interface'),
  simply display the rotating indicator.
  An additional rotating indicator is displayed after the upload
  progress reports 100% complete, in order to account for server
  side post-processing.  (closes #1021)  (addresses #1020)

* Better handles pressing of 'esc' key, in order not to close the
  file revision panel (the transfer is interrupted anyway by the
  browser; Now leaves a chance to make adjustements and "resume").

* Also updates style of "restriction box" for corresponding tooltip
  to stay on same line.

Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: fix error in calling register_download

* When BibDoc.register_download() was called by WebInterfaceFilesPages
  the version parameter was not correctly passed when the version
  was not explicitly set in the URL argument.  This is now fixed.
  (closes #1311)

Reported-by: Johnny Mariéthoz <johnny.mariethoz@rero.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: unit test update

* Amends the tests test_parsing_structured_query_existing_field
  and test_parsing_colons_and_spaces_badly_structured to use
  more common fields to keep the tests from failing on some
  production sites due to different non-Atlantis index
  configurations these sites may have.  (closes #1326)

* Fixes typos in test functions.

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

* maint-1.1:
  WebSearch: unit test update
  BibDocFile: fix error in calling register_download
  BibDocFile: display file upload progress
  BibDocFile: better JS washing in web UI

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

* master:
  WebSearch: unit test update
  BibDocFile: fix error in calling register_download
  BibDocFile: display file upload progress
  BibDocFile: better JS washing in web UI