BibRank: adds a new option to disable bibsort

* Adds CFG_BIBSORT_ENABLE which allows us to disable bibsort in the search
  engine while keeping the ability to run the bibsort daemon.
  (closes #1617)
BibSched: subdirs for bibsched logs

* Splits bibsched logs in subdirs so that do not hit the max number
  of file in the filesystem. Each 10k tasks a new directory is created.
  e.g. for task id 12040 the log will be stored in
       var/log/bibsched/1/bibsched_task_12040.{log,err}
  This happens a lot on AFS were the limit is around 20k.
WebSearch: rg parameter with of='id'

* of='id' is not a special case anymore and behaves like all the other
  output formats, respecting jrec and rg parameters.
WebAuthorProfile: reenable profile pages
BibAuthorID: caches badly stored in user settings

* We were storing too much in the user settings (all the user info actually).
  This patch fixes it.
BibSched: pep8 for bibched.py
BibSched: pep8 for bibtask.py
BibUpload: affected fields and insert mode

* Properly handle affected fields when in insert
  (or insert_or_replace) mode, by recognizing
  when a record is actually created from scratch
  and all its fields are hence affected.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibCheck: properly cumulates records

* Properly cumulates records scheduling batches
  of 1000 records to amend via BibUpload.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
DocExtract: additional report numbers
BibAuthorID: merge and manage fixes

* Display a more meaninful error when requesting manage page for
  a non existing profile

* Better handling of profiles while merging
BatchUploader: authorize via CIDR

* Extends IP-based authorization by supporting
  network ranges (i.e. CIDR) as well.
BatchUploader: insert or replace mode

* Allows to specify the "/insertorreplace" mode
  on the restupload interface, which will map
  to bibupload --insert --replace command line.
BibUpload: new CFG_BIBUPLOAD_MATCH_DELETED_RECORDS

* Introduces new flag CFG_BIBUPLOAD_MATCH_DELETED_RECORDS
  to allow for site-wide configuration policy whether
  to match against deleted records or not, upon
  bibuploading.
  (closes #1438)
BatchUploader: apache error codes

* Correctly sets Apache error codes when replying
  to client requests in robotupload.
BibCheck: last_run correct update

* Correctly updates last_run information for
  each rule with the timestamp of the beginning
  of the execution of bibcheck rather than the
  end (thus avoiding loosing record updates happened
  during the execution of bibcheck itself).

* If filter_collection is not used in a rule,
  uses search_pattern() rather than perform_request_search()
  so that all records are considered and not only
  those that have been created/modified before the
  last webcoll execution.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibUpload: CFG_BIBUPLOAD_EXTERNAL_OAIID_TAG fix

* Fixes automatic updates to CFG_BIBUPLOAD_EXTERNAL_OAIID_TAG
  field, that were not correctly specified in terms
  of indicators, and were thus not stored properly
  into bibxxx tables.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
dbdump: partial dumps

* Creates DB dumps into files with extension .part
  and only at the very end, when the dump is confirmed
  to have actually succeeded, does rename the file
  by removing the .part extension.
  In this way it is clear whether a dump actually
  failed in the middle or not.
Merge branch 'sam/inspire-prod-for-invenio-master'

* NOTE This multi-topic branch consists of 350 commits originated
  at the INSPIRE service development and operation.  It brings
  new features, improvements to existing features, as well as
  numerous bug fixes on a variety of topics.

  While some topics in this multi-topic branch have been fully cleaned
  during the review process and are ready to be used in non-INSPIRE
  production environments, some topics are still work-in-progress in
  nature and will be amended in the coming weeks.

  So please beware with potential upgrading to Invenio/master if you
  are using Invenio/master branch for any production like purpose.

* NOTE The merge commit fixes spin.min.js URL location, fixes flot
  download, fixes bibsched queue detection so that upgrades would work.

Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: reverse order and scores

* Fixes a bug in presenting search results where,
  When order was inversed, the scores were not, leading
  to the wrong association.

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>