WebSearch: nonexisting record API test case fix

* Amends test case `test_search_engine_python_api_for_nonexisting_record()`
  which was showing problems on some Jenkins builds due to warning being
  emitted on stderr which led to xunit infinite recursion.  Using
  still-nonexisting record ID, but within mediumint unsigned bounds (16M)
  does not emit any warning and hence avoids this problem.  (closes #1692)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  WebSearch: nonexisting record API test case fix

Conflicts:
	modules/websearch/lib/websearch_regression_tests.py

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

* maint-1.1:
  WebSearch: nonexisting record API test case fix
global: removal of leftover files

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
BibAuthorID: user prefs and session fix

* The claim link was wrongly stored in user preferences.

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: user preference to enable profiling

* Adds a user preference that is available if you have 'profiling' permissions.
  With this preference, you can enable permanently enable profiling for your
  user. Useful for debugging random slowness.

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
sequtils: increases size of seqSTORE.seq_value

* varchar(60) was still not big enough, varchar(255) is the max.

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
BibRank: record ID citations catchup

* The catchup for record ids got lost in one of the merges...it is now
  added back. This accounts for removed citations for $0 when a cited record
  was modified.

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: display counts in tabs

* The files tab in detailed record pages was not displaying the counts
  next to the tabs, e.g. citations instead of citations(4).

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
htmlutils: render MathML by MathJax

* Adds config variable CFG_MATHJAX_RENDERS_MATHML to enable or disable
  rendering of MathML via MathJax.
* Changes function responsible for loading MathJax to load
  different configuration version according to CFG_MATHJAX_RENDERS_MATHML.
* Amends part numbering in invenio.conf.

Signed-off-by: Wojciech Ziolek <wojciech.ziolek@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
crossrefutils: new Fundref-based APIs

* Introduces new query_fundref_api() and get_all_modified_dois()
  functions, namely needed by the SCOAP3 project, allowing to
  query the Fundref-based Crossref APIs to discover when
  new DOIs are registered by given publishers. This indirectly
  allows to approximately know when they are first created,
  an information that is not available through the regular
  Crossref APIs.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibFormat: affiliation improvements

* In case 100__v or 700__v are available, but not
  100__u or 700__u fallback on $v.

* Introduces new multiple_affiliations flag in
  bfe_authors.py in order to optionally display
  multiple affiliations in case these are available.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibFormat: new bfe_arxiv_link

* Introduces new bfe_arxiv_link format element
  that automatically creates a link to arXiv.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
general: new CFG_SCOAP3_SITE flag

* Introduces new CFG_SCOAP3_SITE flag to introduce
  SCOAP3 specific modifications in core modules.

* If CFG_SCOAP3_SITE=1 renames collections accordingly
  to journals or publishers.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibDocFile: get_file() exact_docformat support

* Introduces new argument exact_docformat to
  BibDoc.get_file() method, allowing to actually
  retrieving a given file matching an exact
  docformat (including the subformat).

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibDocFile: textification with OCR fix

* Textification with OCR is based on a pattern matching
  against the the docname of a BibDoc. This has become a
  property between a record and a BibDoc. The code
  is here updated, thus allowing again textification
  to work.
  (fixes #1676)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibFormat: file rights fix

* Fixes UNIX file rights in the GIT repository.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
WebSearch: better sort order in citation tabs

* Sorts by number of citations, all lists in the citations tab.
  (closes #1307)

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
intbitset: no crash when intbitset is on rhs

* When an intbitset is on the right hand side of a foreign type
  operator (e.g. a set), do no longer crash with a segmentation
  fault, rather raises a TypeError.  (closes #1287)

Reported-by: Thorsten Schwander <thorsten.schwander@gmail.com>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibUpload: --append only new fields

* When bibupload --append mode is used never create
  duplicate fields. Two fields are considered identical
  if they have the same indicators and exactly the same
  subfields in the same order.
  (closes #1440)

Reported-by: Florian Schwennsen <schwenn@mail.desy.de>
Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>