BibAuthorID: merger interface backend

* Backend functions for the merger interface (initial refactoring)
* Added missing docstrings in the logger.
BibAuthorID: customizable profile look.

* Removed unnecessary fields in Atlantis' author's profile page.
* Added fields' visibility configuration.
* Rewritten author's profile page templates.
* Refactored webauthorprofile's webinterface file.

Signed-off-by: Mateusz Susik <mateuszsusik@gmail.com>
Signed-off-by: Samuele Carli <samuele.carli@cern.ch>
BibAuthorID: Refactored citations breakdown categories.

* Small refactoring of _get_breakdown_categories_bounds().

Signed-off-by: Artem Tsikiridis <artem.tsikiridis@cern.ch>
Signed-off-by: Samuele Carli <samuele.carli@cern.ch>
BibAuthorID: Fix most relevant name on APPP

* Fixed computation and display of most relevant name on APPP.
* Removed all usages of create_normalized_name (no need
  to alter the look of displayed names)

Signed-off-by: Artem Tsikiridis <artem.tsikiridis@cern.ch>
Signed-off-by: Samuele Carli <samuele.carli@cern.ch>
BibAuthorID: APPP tickets concurrency fix

* Show an error page when committing already committed tickets
  instead of crashing miserably.

Signed-off-by: Artem Tsikiridis <artem.tsikiridis@cern.ch>
Signed-off-by: Samuele Carli <samuele.carli@cern.ch>
BibAuthorID: get_papers_affected_since fix

* It now uses timestamps from the aidPERSONIDPAPERS and aidPERSONIDDATA tables
  to determine all records which have been touched.

* Bibindex now uses this function correctly.

Signed-off-by: Artem Tsikiridis <artem.tsikiridis@cern.ch>
Signed-off-by: Samuele Carli <samuele.carli@cern.ch>
BibAuthorID: rabbit tests fix

* Fixed tests which were not compatible with nosetests.
* Removed wrong dependency on test order in testutils.
* Better use of etree for xml parsing.

Signed-off-by: Artem Tsikiridis <artiem.tsikiridis@cern.ch>
Signed-off-by: Mateusz Susik <mateusz.susik@cern.ch>
Signed-off-by: Samuele Carli <samuele.carli@cern.ch>
BibAuthorID: lxml is the default parser for rabbit tests. All tests pass.

Signed-off-by: Artem Tsikiridis <artiem.tsikiridis@cern.ch>
Signed-off-by: Mateusz Susik <mateusz.susik@cern.ch>
Merge pull request #36 from fpoli/prod-bibindex-datasource-field

BibIndex: new `datasource` field and `786__w` tag
Bibauthorid: Update regression test as content shown has changed.
Merge pull request #38 from WohthaN/bibauthorid-1.79-ops-hotfixes

Bibauthorid 1.79 ops hotfixes
BibIndex: kwalitee fix

* Runs `autopep8` on bibindex files

* Fixes kwalitee issues

* Updates copyright year

Signed-off-by: Federico Poli <federico.poli@cern.ch>
BibIndex: refactoring and author parent tokenizer

* Refactoring of BibIndex:
  implements inveniosoftware#1710

* Adds a generic parent tokenizer, useful for the dataset records:
  implements inveniosoftware#1885

* Adds 4 demo records for testing purpose

* Adds (and fixes) tests

* Refactoring of `task_run_core` in `bibindex_engine.py`: easier to
  follow, moves the decision of which records need to be reindexed to
  the tokenizers

* Fixes bug: the command `bibindex -w [index name] -m [date range]`
  previously was updating the `last_updated` field of the index

* Moves many of the index specific special cases from
  `bibindex_engine.py` to the tokenizers
  (e.g. `if index_name == "author": # add special tokens`)

* Moves some utility functions from `bibindex_engine.py` to
  `bibindex_engine_utils.py`

* Adds tokenizers `BibIndexAbstractParentTokenizer`,
  `BibIndexCanonicalAuthorTokenizer`,
  `BibIndexExactParentAuthorTokenizer`,
  `BibIndexParentAuthorTokenizer`,
  `BibIndexParentCanonicalAuthorTokenizer`

* Adds indexes `simpleauthor`, `canonicalauthor`, `parentauthor`,
  `parentcanonicalauthor`, `exactsimpleauthor`, `exactparentauthor`

* Adds fields `simpleauthor`, `exactsimpleauthor`

* Adds upgrade script for the database changes
  (uses upgrade_atlantis)

* Transforms `author` and `exactauthor` indexes from regular to
  virtual index

* Adds file `bibindex_engine_tokenizer_regression_tests.py`

* Adds tests for tokenizers, for bibindex CLI, for bibindex utils

* Solves inveniosoftware#1662
  (BibIndex: --reindex should not zero last_updated)

* Edits the commands run by `--load-demo-records` in order to
  reindex the bibauthorid-dependant indexes after the `bibauthorid`
  task (for example `canonicalauthor` and `parentcanonicalauthor`)

Signed-off-by: Federico Poli <federico.poli@cern.ch>