DocExtract: several improvements

* Accepts Publications as reference section.

* Refactors book handling and search.
  (closes #959)

* Daemon extracts all added pdfs.

* Correctly handles PDF/A files.

* Adds LIGO and LHCP report numbers to the kb.

* Adds the filename of the extracted files in the 999C6f field.

* Converts arxiv urls to report numbers

* Adds support for hdl identifiers.

* Sets a priority on which title form is the most important.
  References will be given priority over anything else while Reference
  will rank last with Bibliography in between.
  That means that if "Bibliography" is found in the text, we assume it is
  the reference section and we don't look for a section titles "Reference".

* Improves error message when pdftotext is missing.

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>
Tested-by: Samuele Kaplun <samuele.kaplun@cern.ch>
1: D100 Docstring missing
4: I102 copyright year is outdated, expected 2014 but got 2011
33:19: E126 continuation line over-indented for hanging indent
54: D103 Docstring missing
79:15: E126 continuation line over-indented for hanging indent
81:15: E126 continuation line over-indented for hanging indent
203: D103 Docstring missing
206:64: E502 the backslash is redundant between brackets
207:41: E127 continuation line over-indented for visual indent
207:78: E502 the backslash is redundant between brackets
208:66: E227 missing whitespace around bitwise or shift operator
214: D103 Docstring missing
221: D103 Docstring missing
268:17: E126 continuation line over-indented for hanging indent
268:60: E502 the backslash is redundant between brackets
269:29: E127 continuation line over-indented for visual indent
275:17: E126 continuation line over-indented for hanging indent
279:70: E502 the backslash is redundant between brackets
280:27: E127 continuation line over-indented for visual indent
290:2: E121 continuation line under-indented for hanging indent
291:23: E227 missing whitespace around bitwise or shift operator
291:28: E227 missing whitespace around bitwise or shift operator
296:2: E121 continuation line under-indented for hanging indent
308:24: E227 missing whitespace around bitwise or shift operator
308:29: E227 missing whitespace around bitwise or shift operator
327:11: E126 continuation line over-indented for hanging indent
332:26: E227 missing whitespace around bitwise or shift operator
335:6: E126 continuation line over-indented for hanging indent
338:6: E126 continuation line over-indented for hanging indent
362:26: E227 missing whitespace around bitwise or shift operator
368:26: E126 continuation line over-indented for hanging indent
382:101: E502 the backslash is redundant between brackets
383:32: E128 continuation line under-indented for visual indent
383:42: E227 missing whitespace around bitwise or shift operator
388:9: E131 continuation line unaligned for hanging indent
467:3: E121 continuation line under-indented for hanging indent
473:19: E227 missing whitespace around bitwise or shift operator
476:3: E121 continuation line under-indented for hanging indent
483:19: E227 missing whitespace around bitwise or shift operator
486:3: E121 continuation line under-indented for hanging indent
491:19: E227 missing whitespace around bitwise or shift operator
495:3: E121 continuation line under-indented for hanging indent
501:19: E227 missing whitespace around bitwise or shift operator
511:23: E126 continuation line over-indented for hanging indent
528:3: E121 continuation line under-indented for hanging indent
531:22: E227 missing whitespace around bitwise or shift operator
535:3: E121 continuation line under-indented for hanging indent
539:22: E227 missing whitespace around bitwise or shift operator
543:3: E121 continuation line under-indented for hanging indent
547:22: E227 missing whitespace around bitwise or shift operator
553:3: E121 continuation line under-indented for hanging indent
556:22: E227 missing whitespace around bitwise or shift operator
560:3: E121 continuation line under-indented for hanging indent
564:22: E227 missing whitespace around bitwise or shift operator
568:3: E121 continuation line under-indented for hanging indent
572:22: E227 missing whitespace around bitwise or shift operator
576:3: E121 continuation line under-indented for hanging indent
580:22: E227 missing whitespace around bitwise or shift operator
597:3: E121 continuation line under-indented for hanging indent
601:22: E227 missing whitespace around bitwise or shift operator
606:3: E121 continuation line under-indented for hanging indent
610:22: E227 missing whitespace around bitwise or shift operator
614:3: E121 continuation line under-indented for hanging indent
618:22: E227 missing whitespace around bitwise or shift operator
622:3: E121 continuation line under-indented for hanging indent
625:22: E227 missing whitespace around bitwise or shift operator
643:60: E227 missing whitespace around bitwise or shift operator
646: D301 Use r""" if any backslashes in a docstring
646: D400 First line should end with '.', not 'n'
646: D205 Blank line missing between one-line summary and description
646: D208 Docstring is over-indented
662: D400 First line should end with '.', not 'f'
662: D205 Blank line missing between one-line summary and description
662: D208 Docstring is over-indented
692:42: E502 the backslash is redundant between brackets
693:29: E127 continuation line over-indented for visual indent
693:95: E502 the backslash is redundant between brackets
694:29: E127 continuation line over-indented for visual indent
694:43: E227 missing whitespace around bitwise or shift operator
697:43: E502 the backslash is redundant between brackets
698:24: E128 continuation line under-indented for visual indent
698:90: E502 the backslash is redundant between brackets
699:24: E128 continuation line under-indented for visual indent
699:38: E227 missing whitespace around bitwise or shift operator
705: D400 First line should end with '.', not 'r'
705: D205 Blank line missing between one-line summary and description
705: D208 Docstring is over-indented
743:31: E227 missing whitespace around bitwise or shift operator
746: D400 First line should end with '.', not 't'
746: D205 Blank line missing between one-line summary and description
746: D208 Docstring is over-indented
754:58: E227 missing whitespace around bitwise or shift operator
757:9: E126 continuation line over-indented for hanging indent
760:9: E126 continuation line over-indented for hanging indent
763:9: E126 continuation line over-indented for hanging indent
766:9: E126 continuation line over-indented for hanging indent
770: D400 First line should end with '.', not 'e'
770: D205 Blank line missing between one-line summary and description
770: D208 Docstring is over-indented
808:52: E227 missing whitespace around bitwise or shift operator
813: D400 First line should end with '.', not 's'
813: D205 Blank line missing between one-line summary and description
813: D208 Docstring is over-indented
820:100: E502 the backslash is redundant between brackets
821:100: E502 the backslash is redundant between brackets
825:28: E502 the backslash is redundant between brackets
826:147: E502 the backslash is redundant between brackets
829:52: E227 missing whitespace around bitwise or shift operator
833: D400 First line should end with '.', not 'n'
833: D205 Blank line missing between one-line summary and description
833: D208 Docstring is over-indented
864: D103 Docstring missing