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
80: D103 Docstring missing
131:10: E127 continuation line over-indented for visual indent
135:8: E127 continuation line over-indented for visual indent
173: D400 First line should end with '.', not 's'
173: D205 Blank line missing between one-line summary and description
173: D208 Docstring is over-indented
243:31: E111 indentation is not a multiple of four
243:31: E113 unexpected indentation
260:28: E111 indentation is not a multiple of four
260:28: E113 unexpected indentation
261:28: E111 indentation is not a multiple of four
261:28: E113 unexpected indentation
262:28: E111 indentation is not a multiple of four
262:28: E113 unexpected indentation
267:19: E126 continuation line over-indented for hanging indent
291:19: E121 continuation line under-indented for hanging indent
292:21: E121 continuation line under-indented for hanging indent
302:19: E121 continuation line under-indented for hanging indent
303:21: E121 continuation line under-indented for hanging indent
329: D103 Docstring missing
333: D400 First line should end with '.', not 'N'
338: D400 First line should end with '.', not 's'
348: D400 First line should end with '.', not 's'
375: D400 First line should end with '.', not 's'
387:54: E127 continuation line over-indented for visual indent
392: D400 First line should end with '.', not 'r'
424: D103 Docstring missing
432: D103 Docstring missing
469: D400 First line should end with '.', not 'R'
469: D205 Blank line missing between one-line summary and description
469: D208 Docstring is over-indented
492:25: E113 unexpected indentation
505:25: E127 continuation line over-indented for visual indent
505:39: E203 whitespace before ':'
523: D202 No blank lines allowed *after* function docstring, found 1
523: D400 First line should end with '.', not 's'
523: D205 Blank line missing between one-line summary and description
523: D208 Docstring is over-indented
538:24: E128 continuation line under-indented for visual indent
539:24: E128 continuation line under-indented for visual indent
542: D103 Docstring missing
552: D103 Docstring missing
567: D400 First line should end with '.', not 'd'
567: D205 Blank line missing between one-line summary and description
567: D208 Docstring is over-indented
634:31: E126 continuation line over-indented for hanging indent
677: D400 First line should end with '.', not 'd'
677: D205 Blank line missing between one-line summary and description
677: D208 Docstring is over-indented
710:31: E203 whitespace before ':'
721: D400 First line should end with '.', not 'n'
721: D205 Blank line missing between one-line summary and description
721: D208 Docstring is over-indented
749: D400 First line should end with '.', not 'e'
749: D205 Blank line missing between one-line summary and description
749: D208 Docstring is over-indented
809:18: E127 continuation line over-indented for visual indent
810:18: E127 continuation line over-indented for visual indent
811:38: E127 continuation line over-indented for visual indent
818:18: E127 continuation line over-indented for visual indent
819:18: E127 continuation line over-indented for visual indent
820:28: E127 continuation line over-indented for visual indent
832: D103 Docstring missing
845: D400 First line should end with '.', not 's'
845: D205 Blank line missing between one-line summary and description
845: D208 Docstring is over-indented
869: D400 First line should end with '.', not ','
869: D205 Blank line missing between one-line summary and description
869: D208 Docstring is over-indented
906:34: E203 whitespace before ':'
907:34: E203 whitespace before ':'
908:34: E203 whitespace before ':'
909:34: E203 whitespace before ':'
910:34: E203 whitespace before ':'
911:34: E203 whitespace before ':'
912:34: E203 whitespace before ':'
913:34: E203 whitespace before ':'
914:34: E203 whitespace before ':'
960:17: E128 continuation line under-indented for visual indent
963:17: E128 continuation line under-indented for visual indent
992:21: E128 continuation line under-indented for visual indent
1007: D400 First line should end with '.', not 'y'
1007: D205 Blank line missing between one-line summary and description
1007: D208 Docstring is over-indented
1028: D400 First line should end with '.', not ','
1028: D205 Blank line missing between one-line summary and description
1028: D208 Docstring is over-indented
1043:16: E127 continuation line over-indented for visual indent
1049: D103 Docstring missing
1059: D400 First line should end with '.', not 'n'
1059: D205 Blank line missing between one-line summary and description
1059: D208 Docstring is over-indented
1106: D205 Blank line missing between one-line summary and description
1106: D208 Docstring is over-indented
1136:35: E111 indentation is not a multiple of four
1136:35: E113 unexpected indentation
1138:35: E111 indentation is not a multiple of four
1138:35: E113 unexpected indentation
1171: D400 First line should end with '.', not 'e'
1171: D205 Blank line missing between one-line summary and description
1171: D208 Docstring is over-indented
1198: D400 First line should end with '.', not 'e'
1198: D205 Blank line missing between one-line summary and description
1198: D208 Docstring is over-indented
1210:35: E111 indentation is not a multiple of four
1210:35: E113 unexpected indentation
1212:35: E111 indentation is not a multiple of four
1212:35: E113 unexpected indentation
1243:20: E127 continuation line over-indented for visual indent
1248:53: E127 continuation line over-indented for visual indent
1251:37: E127 continuation line over-indented for visual indent
1252:37: E127 continuation line over-indented for visual indent
1259: D103 Docstring missing
1261:24: E111 indentation is not a multiple of four
1261:24: E113 unexpected indentation
1271: D400 First line should end with '.', not 'e'
1271: D205 Blank line missing between one-line summary and description
1271: D208 Docstring is over-indented
1314:24: E221 multiple spaces before operator
1315:23: E221 multiple spaces before operator
1324:16: E221 multiple spaces before operator
1325:17: E221 multiple spaces before operator
1328:39: E221 multiple spaces before operator
1329:38: E221 multiple spaces before operator
1338:18: E221 multiple spaces before operator
1339:16: E221 multiple spaces before operator
1340:17: E221 multiple spaces before operator
1348:39: E221 multiple spaces before operator
1349:38: E221 multiple spaces before operator
1361:16: E126 continuation line over-indented for hanging indent
1384: D401 First line should be imperative: 'take', not 'takes'
1384: D205 Blank line missing between one-line summary and description
1384: D208 Docstring is over-indented