BibRank: fixes for sorting
- Takes into account sorting order ranking records
- Fixes case where we use the old style search p='recid:1211' and rm='citation' which gives is transformed to p='refersto:recid:1211'
- Ignores bibsort buckets when sorting by citation because we can already sort fast using the in-memory dictionary
- Fixes some regression tests results order
- Better handling of ranking results when result is None
- pep8 fixes