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 ','
1: D205 Blank line missing between one-line summary and description
4: I102 copyright year is outdated, expected 2014 but got 2011
41:9: E126 continuation line over-indented for hanging indent
42:18: E203 whitespace before ':'
43:18: E203 whitespace before ':'
44:18: E203 whitespace before ':'
45:18: E203 whitespace before ':'
46:18: E203 whitespace before ':'
47:18: E203 whitespace before ':'
48:18: E203 whitespace before ':'
49:18: E203 whitespace before ':'
50:18: E203 whitespace before ':'
51:18: E203 whitespace before ':'
52:18: E203 whitespace before ':'
53:18: E203 whitespace before ':'
54:18: E203 whitespace before ':'
55:18: E203 whitespace before ':'
56:18: E203 whitespace before ':'
57:18: E203 whitespace before ':'
58:18: E203 whitespace before ':'
59:18: E203 whitespace before ':'
61:18: E203 whitespace before ':'
63:22: E203 whitespace before ':'
64:22: E203 whitespace before ':'
65:22: E203 whitespace before ':'
66:22: E203 whitespace before ':'
67:22: E203 whitespace before ':'
68:22: E203 whitespace before ':'
69:22: E203 whitespace before ':'
70:22: E203 whitespace before ':'
71:22: E203 whitespace before ':'
72:22: E203 whitespace before ':'
73:22: E203 whitespace before ':'
74:22: E203 whitespace before ':'
75:22: E203 whitespace before ':'
76:22: E203 whitespace before ':'
77:22: E203 whitespace before ':'
78:22: E203 whitespace before ':'
79:22: E203 whitespace before ':'
80:22: E203 whitespace before ':'
81:22: E203 whitespace before ':'
82:22: E203 whitespace before ':'
83:22: E203 whitespace before ':'
84:22: E203 whitespace before ':'
85:22: E203 whitespace before ':'
86:22: E203 whitespace before ':'
87:22: E203 whitespace before ':'
88:22: E203 whitespace before ':'
89:22: E203 whitespace before ':'
90:22: E203 whitespace before ':'
91:22: E203 whitespace before ':'
92:22: E203 whitespace before ':'
93:22: E203 whitespace before ':'
94:22: E203 whitespace before ':'
95:22: E203 whitespace before ':'
96:22: E203 whitespace before ':'
97:22: E203 whitespace before ':'
98:22: E203 whitespace before ':'
99:22: E203 whitespace before ':'
100:22: E203 whitespace before ':'
101:22: E203 whitespace before ':'
102:22: E203 whitespace before ':'
103:22: E203 whitespace before ':'
104:22: E203 whitespace before ':'
105:22: E203 whitespace before ':'
106:22: E203 whitespace before ':'
107:22: E203 whitespace before ':'
108:22: E203 whitespace before ':'
109:22: E203 whitespace before ':'
110:22: E203 whitespace before ':'
111:22: E203 whitespace before ':'
112:22: E203 whitespace before ':'
113:22: E203 whitespace before ':'
114:22: E203 whitespace before ':'
115:22: E203 whitespace before ':'
116:22: E203 whitespace before ':'
117:22: E203 whitespace before ':'
118:22: E203 whitespace before ':'
119:22: E203 whitespace before ':'
120:22: E203 whitespace before ':'
121:22: E203 whitespace before ':'
122:22: E203 whitespace before ':'
123:22: E203 whitespace before ':'
124:22: E203 whitespace before ':'
125:22: E203 whitespace before ':'
126:22: E203 whitespace before ':'
127:22: E203 whitespace before ':'
128:22: E203 whitespace before ':'
129:22: E203 whitespace before ':'
130:22: E203 whitespace before ':'
131:22: E203 whitespace before ':'
132:22: E203 whitespace before ':'
133:22: E203 whitespace before ':'
134:22: E203 whitespace before ':'
135:22: E203 whitespace before ':'
136:22: E203 whitespace before ':'
137:22: E203 whitespace before ':'
138:22: E203 whitespace before ':'
139:22: E203 whitespace before ':'
140:22: E203 whitespace before ':'
141:22: E203 whitespace before ':'
142:22: E203 whitespace before ':'
143:22: E203 whitespace before ':'
144:22: E203 whitespace before ':'
145:22: E203 whitespace before ':'
146:22: E203 whitespace before ':'
147:22: E203 whitespace before ':'
148:22: E203 whitespace before ':'
149:22: E203 whitespace before ':'
150:22: E203 whitespace before ':'
151:22: E203 whitespace before ':'
152:22: E203 whitespace before ':'
153:22: E203 whitespace before ':'
154:22: E203 whitespace before ':'
155:22: E203 whitespace before ':'
156:22: E203 whitespace before ':'
157:22: E203 whitespace before ':'
158:22: E203 whitespace before ':'
159:22: E203 whitespace before ':'
160:22: E203 whitespace before ':'
161:22: E203 whitespace before ':'
162:22: E203 whitespace before ':'
163:22: E203 whitespace before ':'
164:22: E203 whitespace before ':'
165:22: E203 whitespace before ':'
166:22: E203 whitespace before ':'
167:22: E203 whitespace before ':'
168:22: E203 whitespace before ':'
169:22: E203 whitespace before ':'
170:22: E203 whitespace before ':'
171:22: E203 whitespace before ':'
172:22: E203 whitespace before ':'
173:22: E203 whitespace before ':'
174:22: E203 whitespace before ':'
175:22: E203 whitespace before ':'
176:22: E203 whitespace before ':'
177:22: E203 whitespace before ':'
178:22: E203 whitespace before ':'
179:22: E203 whitespace before ':'
180:22: E203 whitespace before ':'
181:22: E203 whitespace before ':'
182:22: E203 whitespace before ':'
183:22: E203 whitespace before ':'
184:22: E203 whitespace before ':'
185:22: E203 whitespace before ':'
186:22: E203 whitespace before ':'
187:22: E203 whitespace before ':'
188:22: E203 whitespace before ':'
189:22: E203 whitespace before ':'
190:22: E203 whitespace before ':'
192:22: E203 whitespace before ':'
193:22: E203 whitespace before ':'
194:22: E203 whitespace before ':'
195:22: E203 whitespace before ':'
196:22: E203 whitespace before ':'
197:22: E203 whitespace before ':'
198:22: E203 whitespace before ':'
199:22: E203 whitespace before ':'
200:18: E203 whitespace before ':'
201:18: E203 whitespace before ':'
203:18: E203 whitespace before ':'
204:18: E203 whitespace before ':'
205:18: E203 whitespace before ':'
207:18: E203 whitespace before ':'
208:18: E203 whitespace before ':'
209:18: E203 whitespace before ':'
210:18: E203 whitespace before ':'
212:18: E203 whitespace before ':'
213:18: E203 whitespace before ':'
215:18: E203 whitespace before ':'
216:18: E203 whitespace before ':'
217:18: E203 whitespace before ':'
218:18: E203 whitespace before ':'
219:18: E203 whitespace before ':'
220:18: E203 whitespace before ':'
221:18: E203 whitespace before ':'
222:18: E203 whitespace before ':'
223:18: E203 whitespace before ':'
224:18: E203 whitespace before ':'
225:18: E203 whitespace before ':'
226:18: E203 whitespace before ':'
227:18: E203 whitespace before ':'
228:18: E203 whitespace before ':'
229:18: E203 whitespace before ':'
230:18: E203 whitespace before ':'
232:14: E203 whitespace before ':'
234:18: E203 whitespace before ':'
235:18: E203 whitespace before ':'
237:26: E203 whitespace before ':'
238:18: E203 whitespace before ':'
240:18: E203 whitespace before ':'
242:18: E203 whitespace before ':'
243:18: E203 whitespace before ':'
244:18: E203 whitespace before ':'
245:18: E203 whitespace before ':'
246:18: E203 whitespace before ':'
248:18: E203 whitespace before ':'
249:18: E203 whitespace before ':'
252:18: E203 whitespace before ':'
253:18: E203 whitespace before ':'
258:20: E203 whitespace before ':'
259:20: E203 whitespace before ':'
260:20: E203 whitespace before ':'
261:20: E203 whitespace before ':'
262:20: E203 whitespace before ':'
263:20: E203 whitespace before ':'
264:20: E203 whitespace before ':'
265:20: E203 whitespace before ':'
266:20: E203 whitespace before ':'
267:20: E203 whitespace before ':'
268:20: E203 whitespace before ':'
269:20: E203 whitespace before ':'
270:17: E203 whitespace before ':'
271:17: E203 whitespace before ':'
272:17: E203 whitespace before ':'
273:17: E203 whitespace before ':'
274:17: E203 whitespace before ':'
275:17: E203 whitespace before ':'
276:17: E203 whitespace before ':'
277:17: E203 whitespace before ':'
278:17: E203 whitespace before ':'
279:17: E203 whitespace before ':'
280:17: E203 whitespace before ':'
281:17: E203 whitespace before ':'
283:17: E203 whitespace before ':'
284:17: E203 whitespace before ':'
285:17: E203 whitespace before ':'
286:17: E203 whitespace before ':'
287:17: E203 whitespace before ':'
288:17: E203 whitespace before ':'
289:17: E203 whitespace before ':'
290:17: E203 whitespace before ':'
291:17: E203 whitespace before ':'
292:17: E203 whitespace before ':'
293:17: E203 whitespace before ':'
294:17: E203 whitespace before ':'
295:18: E203 whitespace before ':'
296:18: E203 whitespace before ':'
297:18: E203 whitespace before ':'
298:18: E203 whitespace before ':'
299:18: E203 whitespace before ':'
300:18: E203 whitespace before ':'
301:18: E203 whitespace before ':'
302:18: E203 whitespace before ':'
303:18: E203 whitespace before ':'
304:18: E203 whitespace before ':'
305:18: E203 whitespace before ':'
306:18: E203 whitespace before ':'
308:17: E203 whitespace before ':'
309:17: E203 whitespace before ':'
310:17: E203 whitespace before ':'
311:17: E203 whitespace before ':'
312:17: E203 whitespace before ':'
313:17: E203 whitespace before ':'
314:17: E203 whitespace before ':'
315:17: E203 whitespace before ':'
316:17: E203 whitespace before ':'
317:18: E203 whitespace before ':'
318:17: E203 whitespace before ':'
319:17: E203 whitespace before ':'
320:17: E203 whitespace before ':'
321:18: E203 whitespace before ':'
322:18: E203 whitespace before ':'
323:18: E203 whitespace before ':'
324:18: E203 whitespace before ':'
325:18: E203 whitespace before ':'
326:18: E203 whitespace before ':'
327:18: E203 whitespace before ':'
328:18: E203 whitespace before ':'
329:18: E203 whitespace before ':'
330:19: E203 whitespace before ':'
331:18: E203 whitespace before ':'
332:18: E203 whitespace before ':'
333:18: E203 whitespace before ':'
334:20: E203 whitespace before ':'
335:20: E203 whitespace before ':'
336:20: E203 whitespace before ':'
337:20: E203 whitespace before ':'
338:20: E203 whitespace before ':'
339:20: E203 whitespace before ':'
340:20: E203 whitespace before ':'
341:20: E203 whitespace before ':'
342:20: E203 whitespace before ':'
343:21: E203 whitespace before ':'
344:20: E203 whitespace before ':'
345:20: E203 whitespace before ':'
346:20: E203 whitespace before ':'
347:19: E203 whitespace before ':'
348:19: E203 whitespace before ':'
349:19: E203 whitespace before ':'
350:19: E203 whitespace before ':'
351:19: E203 whitespace before ':'
352:19: E203 whitespace before ':'
353:19: E203 whitespace before ':'
354:19: E203 whitespace before ':'
355:19: E203 whitespace before ':'
356:20: E203 whitespace before ':'
357:19: E203 whitespace before ':'
358:19: E203 whitespace before ':'
359:19: E203 whitespace before ':'
361:20: E203 whitespace before ':'
362:20: E203 whitespace before ':'
363:20: E203 whitespace before ':'
364:20: E203 whitespace before ':'
365:20: E203 whitespace before ':'
366:20: E203 whitespace before ':'
367:20: E203 whitespace before ':'
368:20: E203 whitespace before ':'
369:20: E203 whitespace before ':'
370:20: E203 whitespace before ':'
371:19: E203 whitespace before ':'
372:19: E203 whitespace before ':'
373:19: E203 whitespace before ':'
374:19: E203 whitespace before ':'
375:19: E203 whitespace before ':'
376:19: E203 whitespace before ':'
377:19: E203 whitespace before ':'
378:19: E203 whitespace before ':'
379:19: E203 whitespace before ':'
380:19: E203 whitespace before ':'
387:19: E203 whitespace before ':'
388:19: E203 whitespace before ':'
389:19: E203 whitespace before ':'
390:19: E203 whitespace before ':'
391:19: E203 whitespace before ':'
392:19: E203 whitespace before ':'
394:19: E203 whitespace before ':'
395:19: E203 whitespace before ':'
397:19: E203 whitespace before ':'
398:19: E203 whitespace before ':'
401:19: E203 whitespace before ':'
402:19: E203 whitespace before ':'
403:19: E203 whitespace before ':'
404:19: E203 whitespace before ':'
405:19: E203 whitespace before ':'
406:19: E203 whitespace before ':'
407:19: E203 whitespace before ':'
426: D205 Blank line missing between one-line summary and description
444: D401 First line should be imperative: 'Sometime', not 'Sometimes'
444: D400 First line should end with '.', not 'y'
444: D205 Blank line missing between one-line summary and description
444: D208 Docstring is over-indented
470: D290 White spaces around docstring should be trimmed.
470: D400 First line should end with '.', not 't'
495:23: E127 continuation line over-indented for visual indent
515:56: E502 the backslash is redundant between brackets
516:22: E127 continuation line over-indented for visual indent