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: D400 First line should end with '.', not 'e'
4: I102 copyright year is outdated, expected 2014 but got 2013
41: D103 Docstring missing
49:56: E127 continuation line over-indented for visual indent
59:25: E203 whitespace before ':'
60:25: E203 whitespace before ':'
61:25: E203 whitespace before ':'
62:25: E203 whitespace before ':'
67: D101 Docstring missing
69: D102 Docstring missing
85: D102 Docstring missing
89: D102 Docstring missing
100: D102 Docstring missing
112: D400 First line should end with '.', not 'n'
125: D102 Docstring missing
143: D102 Docstring missing
154: D102 Docstring missing
166: D102 Docstring missing
178: D401 First line should be imperative: 'Check', not 'Checks'
178: D400 First line should end with '.', not 'd'
198: D203 Expected 1 blank line *before* class docstring, found 0
198: D400 First line should end with '.', not 't'
201: D102 Docstring missing
271: D102 Docstring missing
274: D102 Docstring missing
285: D102 Docstring missing
316: D102 Docstring missing
332: D102 Docstring missing
342: D102 Docstring missing
358: D102 Docstring missing
373: D102 Docstring missing
383: D102 Docstring missing
398: D102 Docstring missing
413: D102 Docstring missing
423: D102 Docstring missing
440: D102 Docstring missing
455: D400 First line should end with '.', not 's'
466: D209 Put multi-line docstring closing quotes on separate line
466: D400 First line should end with '.', not 'r'
482: D209 Put multi-line docstring closing quotes on separate line
482: D400 First line should end with '.', not 'd'
499: D102 Docstring missing
522: D102 Docstring missing
537: D102 Docstring missing
552: D102 Docstring missing
562: D102 Docstring missing
578: D102 Docstring missing
588: D102 Docstring missing
608: D102 Docstring missing
619: D102 Docstring missing
630: D102 Docstring missing
640: D102 Docstring missing
651: D102 Docstring missing
669: D102 Docstring missing
679: D102 Docstring missing
691: D102 Docstring missing
702: D102 Docstring missing
712: D102 Docstring missing
727: D102 Docstring missing
746: D102 Docstring missing
765: D102 Docstring missing
780: D102 Docstring missing
795: D102 Docstring missing
810: D102 Docstring missing
821: D102 Docstring missing
839: D102 Docstring missing
854: D102 Docstring missing
879: D102 Docstring missing
900: D400 First line should end with '.', not 'm'
917: D400 First line should end with '.', not 'm'
934: D102 Docstring missing
946: D102 Docstring missing
958: D102 Docstring missing
970: D102 Docstring missing
981: D102 Docstring missing
992: D102 Docstring missing
1003: D102 Docstring missing
1055: D400 First line should end with '.', not 't'
1073: D401 First line should be imperative: 'Serie', not 'Series'
1073: D400 First line should end with '.', not 'y'
1073: D300 Expected """-quotes, got '-quotes
1091: D401 First line should be imperative: 'Serie', not 'Series'
1091: D400 First line should end with '.', not 'y'
1091: D300 Expected """-quotes, got '-quotes
1109: D401 First line should be imperative: 'Serie', not 'Series'
1109: D400 First line should end with '.', not 'y'
1109: D300 Expected """-quotes, got '-quotes
1127: D400 First line should end with '.', not 't'
1127: D300 Expected """-quotes, got '-quotes
1138: D102 Docstring missing
1155: D102 Docstring missing
1166: D102 Docstring missing
1175: D102 Docstring missing
1186: D102 Docstring missing
1208: D102 Docstring missing
1236: D401 First line should be imperative: 'author', not 'authors'
1236: D400 First line should end with '.', not 's'
1249: D102 Docstring missing
1260: D209 Put multi-line docstring closing quotes on separate line
1260: D400 First line should end with '.', not 'e'
1260: D205 Blank line missing between one-line summary and description
1271: D400 First line should end with '.', not 'a'
1281: D290 White spaces around docstring should be trimmed.
1281: D400 First line should end with '.', not '"'
1303: D400 First line should end with '.', not 't'
1328: D400 First line should end with '.', not 'n'
1341: D102 Docstring missing
1352: D102 Docstring missing
1363: D102 Docstring missing
1373: D102 Docstring missing
1384: D209 Put multi-line docstring closing quotes on separate line
1384: D400 First line should end with '.', not 's'
1384: D205 Blank line missing between one-line summary and description
1397: D209 Put multi-line docstring closing quotes on separate line
1397: D400 First line should end with '.', not 's'
1397: D205 Blank line missing between one-line summary and description
1410: D209 Put multi-line docstring closing quotes on separate line
1410: D400 First line should end with '.', not 's'
1410: D205 Blank line missing between one-line summary and description
1423: D209 Put multi-line docstring closing quotes on separate line
1423: D400 First line should end with '.', not 's'
1423: D205 Blank line missing between one-line summary and description
1436: D102 Docstring missing
1447: D102 Docstring missing
1458: D102 Docstring missing
1469: D102 Docstring missing
1480: D102 Docstring missing
1503: D102 Docstring missing
1513: D400 First line should end with '.', not '1'
1513: D300 Expected """-quotes, got '-quotes
1531: D102 Docstring missing
1543: D102 Docstring missing
1555: D102 Docstring missing
1567: D102 Docstring missing
1578: D102 Docstring missing
1589: D102 Docstring missing
1600: D400 First line should end with '.', not 't'
1613: D400 First line should end with '.', not 's'
1626: D401 First line should be imperative: 'wa', not 'was'
1626: D400 First line should end with '.', not 'P'
1638: D102 Docstring missing
1648: D102 Docstring missing
1658: D102 Docstring missing
1670: D102 Docstring missing
1681: D102 Docstring missing
1693: D102 Docstring missing
1705: D102 Docstring missing
1714: D102 Docstring missing
1726: D102 Docstring missing
1738: D102 Docstring missing
1749: D400 First line should end with '.', not 't'
1764: D102 Docstring missing
1775: D102 Docstring missing
1786: D102 Docstring missing
1797: D102 Docstring missing
1825: D102 Docstring missing
1859: D209 Put multi-line docstring closing quotes on separate line
1859: D400 First line should end with '.', not 'r'
1902: D102 Docstring missing
1916: D102 Docstring missing
1931: D102 Docstring missing
1945: D102 Docstring missing
1974: D102 Docstring missing
1997: D400 First line should end with '.', not 'T'
2011: D400 First line should end with '.', not 'e'
2025: D102 Docstring missing
2036: D102 Docstring missing
2047: D102 Docstring missing
2058: D102 Docstring missing
2069: D102 Docstring missing
2080: D102 Docstring missing
2092: D102 Docstring missing
2104: D102 Docstring missing
2114: D102 Docstring missing
2126: D102 Docstring missing
2138: D102 Docstring missing
2150: D102 Docstring missing
2161: D102 Docstring missing
2172: D102 Docstring missing
2183: D102 Docstring missing
2196: D102 Docstring missing
2209: D102 Docstring missing
2220: D102 Docstring missing
2231: D102 Docstring missing
2242: D102 Docstring missing
2252: D102 Docstring missing
2263: D102 Docstring missing
2274: D102 Docstring missing
2285: D102 Docstring missing
2296: D102 Docstring missing
2306: D102 Docstring missing
2317: D102 Docstring missing
2328: D102 Docstring missing
2338: D102 Docstring missing
2349: D102 Docstring missing
2360: D102 Docstring missing
2370: D102 Docstring missing
2380: D102 Docstring missing
2390: D102 Docstring missing
2401: D102 Docstring missing
2418: D102 Docstring missing
2430: D400 First line should end with '.', not 't'
2444: D400 First line should end with '.', not 'r'
2456: D400 First line should end with '.', not 'r'
2466: D400 First line should end with '.', not 'r'
2476: D102 Docstring missing
2485: D400 First line should end with '.', not 'r'
2496: D102 Docstring missing
2505: D102 Docstring missing
2514: D102 Docstring missing
2523: D102 Docstring missing
2533: D102 Docstring missing
2542: D102 Docstring missing
2563: D400 First line should end with '.', not 'g'
2589: D401 First line should be imperative: 'Test', not 'Tests'
2589: D400 First line should end with '.', not 't'
2608: D102 Docstring missing
2619: D102 Docstring missing
2630: D400 First line should end with '.', not 'k'
2646: D400 First line should end with '.', not 'y'
2658: D401 First line should be imperative: 'Make', not 'Makes'
2658: D400 First line should end with '.', not 'r'
2671: D102 Docstring missing
2682: D102 Docstring missing
2693: D102 Docstring missing
2704: D102 Docstring missing
2720: D102 Docstring missing
2736: D102 Docstring missing
2762: D102 Docstring missing
2784: D102 Docstring missing
2793: D102 Docstring missing
2803: D102 Docstring missing
2814: D102 Docstring missing
2823: D102 Docstring missing
2832: D102 Docstring missing
2841: D102 Docstring missing
2850: D102 Docstring missing
2859: D102 Docstring missing
2868: D102 Docstring missing
2885: D209 Put multi-line docstring closing quotes on separate line
2885: D400 First line should end with '.', not 'r'
2899: D209 Put multi-line docstring closing quotes on separate line
2899: D400 First line should end with '.', not 'r'
2911: D102 Docstring missing
2924: D102 Docstring missing
2933: D102 Docstring missing
2943: D400 First line should end with '.', not 'r'
2961: D102 Docstring missing
2970: D401 First line should be imperative: 'Check', not 'Checks'
2970: D400 First line should end with '.', not 't'
2980: D401 First line should be imperative: 'Check', not 'Checks'
2980: D400 First line should end with '.', not 'n'
2990: D401 First line should be imperative: 'Check', not 'Checks'
2990: D400 First line should end with '.', not 'n'
3000: D401 First line should be imperative: 'Check', not 'Checks'
3000: D400 First line should end with '.', not 'r'
3011: D101 Docstring missing
3012: D102 Docstring missing
3016: D102 Docstring missing
3020: D102 Docstring missing
3022:9: E301 expected 1 blank line, found 0
3035: D101 Docstring missing
3036: D209 Put multi-line docstring closing quotes on separate line
3036: D400 First line should end with '.', not 's'
3054: D400 First line should end with '.', not 'L'
3059: D102 Docstring missing
3068: D102 Docstring missing
3070:9: E301 expected 1 blank line, found 0