Pass options hash down to SearchQueryBuilder

this will allow us to pass arbitrary options to the search method.

Also added support for minimum_should_match option to query builder.
Allow bin/search to pass minimum_should_match

This will allow us to experiment with different settings
bin/search can dump the query JSON
Allow limit to be passed to query builder
Allow side-by-side comparison of results

Can compare results with different minimum_should_match settings
Add sensible default minimum_should_match

Number of | Minimum
optional  | should
clauses   | match
----------+---------
1         | 1
2         | 2
3         | 2
4         | 3
5         | 3
6         | 3
7         | 3
8+        | 50%

The setting was worked out by using the comparison feature of bin/search
with various example queries of different lengths (3, 4, 5, 7, 9 words)
and inspecting the consequences on search results.
Add result promoter

this will be responsible for handling promoted results
such as universal job search
Split promoted result into separate file
Pass promoted result settings to index

The promoted results settings will be configured in the
elasticsearch_schema.yml file and passed down from the Server to
IndexGroup to Index.

This will allow them to be used at both search and indexing time.
Configure jobsearch to be a promoted item

We know that a lot of people search for "jobs in birmingham" for
example. With a minimum_should_match setting this would not find the
jobsearch. We want to ensure that jobsearch shows up for any such query,
so we make it a promoted item.
Allow decorating document hashes with promoted_for

This is used at indexing time to set the promoted_for field
Indexing a promoted document should set promoted_for

A promoted document, identified by its link, will have the
'promoted_for' field set. This will then allow it to match against the
promotional clause in the search query and be boosted.
Add search clause to boost promoted items

Promoted items will have the promoted_for field set to a list of
keywords. This is an analyzed field so promotional terms will be stemmed
etc.

I've changed the search query to add an outer bool query with two should
clauses:
  i) the previous bool query containing the main search part for the
phrase (with minimum_should_match) and should clauses for boosting
  ii) a clause which matches only against the promoted_for field

Any documents matching promoted_for will immediately be boosted to the
top of the results. All other aspects of the search query remain
unchanged.
Add comment that promoted_result terms are stemmed
Remove defunct method
More descriptive variable names
Add feature flag for minimum_should_match

We want to let people evaluate it a bit in preview before it's deployed
to production.

This is passed down from frontend, see:

alphagov/frontend@6fd67707
Merge pull request #108 from alphagov/minimum_should_match

Minimum should match
Bugfix in elasticsearch_index_test.rb

The test_basic_keyword_search test is a bit brittle because it's just
doing a regexp match on the json payload body. I had accidentally left
in the option to pretty-format the json sent to elasticsearch
(undesirable, admittedly), which was causing the test to fail.