Document arguments
SearchQueryBuilder can now validate the query

Only validates that:
  * the order field is one of "asc" or "desc"
  * the sort field is defined in the mappings
More documentation of arguments
Index.search raises an error for invalid queries
Gracefully respond to an invalid query
Raise a semantic catchable error for invalid query

Just added this for normal search, let's do it for advanced_search too.

In this situation it would raise a RuntimeError that the Sinatra app wasn't
catching, so the response would be a 500 with no explanation (except in dev).
Use 422 rather than 400

400 should be for a malformed HTTP request, which isn't the problem. Whereas
422 is for a semantically invalid request, which is what we're trying to
describe.
Merge pull request #136 from alphagov/validate_sorting

Validate sorting