sorter: multiple tag sorting fixes

* Fixes issue in sorting according to multiple MARC tags.

* Fixes issue with ordering of sorted records as well as handling of
  unsorted records.

* Fixes record slicing issue using 1-indexed value instead of
  0-indexed value.

* Adds generic method to decide whether to rank or sort records and
  changes facets to use this method.

* Adds two configuration variables to control default sort field and
  order.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>