Add facet calculation to unified search API

This adds support for supplying facet_<fieldname> parameters to the API,
which return counts of the top values in that field in documents which
match the query.

This is designed to support multi-select facets in the API, and to
support having several active facet fields at a time.  To do this
correctly, the "filters" part of the request payload sent to
elasticsearch needs to contain only filters related to facet fields.
Any other filters are now included in the "query" part of the request
payload using a "filtered" query in elasticsearch.
Expand fields in facet results

This adds a FieldPresenter class, which behaves similarly to the
existing code in ResultPresenter in the way it expands field values, but
is parameterised by field name instead of being hardcoded for several
fields.

Unfortunately, the existing "registries" hash which is used by
ResultPresenter is not keyed by field name, or even by something which
can be programatically converted to field name (some of the keys are
pluralised differently to the corresponding field names), so we pass a
second hash of registries which are actually keyed by field name from
the app through to the UnifiedSearchPresenter for use by the
FieldPresenter.

A later commit could update ResultPresenter to use FieldPresenter, and
remove the old registry hash.
Remove blank lines
Use .map and .reject instead of .each

Makes some of the code in the search builder clearer.
Clearer chained blocks and field name validation

Follow style guide to use {} for chained blocks instead of do-end.  Move
field name validation to a separate iteration over the field names, to
make code clearer and to complain about all unused field names.
Merge pull request #207 from alphagov/search_facets

Add facet calculation to unified search API