WebSearch: limit on 'refersto' and similar keywords

WebSearch: limit on 'refersto' and simular keywords
* Limit DOS attacks with 'refersto' and similar keywords (e.g. 'refersto:year:0-->9999').
* Adds configuration variable CFG_WEBSEARCH_MAX_RECORDS_REFERSTO and CFG_WEBSEARCH_MAX_RECORDS_CITEDBY.
* Limits result used by 'refersto', 'referstoexcludingselfcites' to CFG_WEBSEARCH_MAX_RECORDS_REFERSTO.
* Limits result used by 'citedby', 'citedbyexcludingselfcites' to CFG_WEBSEARCH_MAX_RECORDS_CITEDBY.
* Adds classes 'InvenioWebSearchReferstoLimitError' and 'InvenioWebSearchCitedbyLimitError'.
* Adds warning messages when the limit CFG_WEBSEARCH_MAX_RECORDS_* is reached.
* In BibRank adds 'input_limits' parameter to 'get_refersto_by_list', 'get_refersto_hitset', 'get_cited_by_list', 'get_citedby_hitset' (default to None = no limit).
* Adds regression test for the query 'refersto:year:2000'.

Signed-off-by: Federico Poli <federico.poli@cern.ch>
1: D100 Docstring missing
4: I102 copyright year is outdated, expected 2014 but got 2011
32: D203 Expected 1 blank line *before* class docstring, found 0
32: D204 Expected 1 blank line *after* class docstring, found 0
32: D400 First line should end with '.', not ','
32: D205 Blank line missing between one-line summary and description
37: D102 Docstring missing
75:32: E111 indentation is not a multiple of four
75:32: E113 unexpected indentation
92: D401 First line should be imperative: 'Return', not 'Returns'
92: D400 First line should end with '.', not 'y'
92: D205 Blank line missing between one-line summary and description
113: D400 First line should end with '.', not 'd'
120: D400 First line should end with '.', not 'd'
134: D400 First line should end with '.', not ','
134: D205 Blank line missing between one-line summary and description
134: D208 Docstring is over-indented
150:21: E721 do not compare types, use 'isinstance()'
165:25: E128 continuation line under-indented for visual indent
166:25: E128 continuation line under-indented for visual indent
175:5: W191 indentation contains tabs
175:5: E101 indentation contains mixed spaces and tabs
178:30: E128 continuation line under-indented for visual indent
179:30: E128 continuation line under-indented for visual indent
187:26: E128 continuation line under-indented for visual indent
187:62: E502 the backslash is redundant between brackets
188:26: E128 continuation line under-indented for visual indent
193: D400 First line should end with '.', not 's'
193: D205 Blank line missing between one-line summary and description
221: D400 First line should end with '.', not 's'
221: D205 Blank line missing between one-line summary and description
249: D400 First line should end with '.', not 'm'
249: D205 Blank line missing between one-line summary and description
280: D401 First line should be imperative: 'Return', not 'Returns'
280: D400 First line should end with '.', not 'd'
280: D200 One-line docstring should not occupy 2 lines
288: D400 First line should end with '.', not 'e'
288: D205 Blank line missing between one-line summary and description
288: D208 Docstring is over-indented
301: D400 First line should end with '.', not 'n'
301: D205 Blank line missing between one-line summary and description
331: D400 First line should end with '.', not 'e'
331: D205 Blank line missing between one-line summary and description
331: D208 Docstring is over-indented
351: D400 First line should end with '.', not 's'
351: D205 Blank line missing between one-line summary and description
351: D208 Docstring is over-indented
373: D103 Docstring missing