Add pry
SearchParameterParser is aware of field type
Parsed search parameter hash contains typed values
Parsed params contains filter object
CMA case opened_date should be indexed

In order to filter on this field it needs to be indexed, otherwise
elasticsearch silently returns zero results when trying to do the
filter.
Allow date filtering using only from or to

It should be possible to provide only one of the bounds for filtering
rather than having to give both.

Introduces a lightweight null date object so that we can call `iso8601`
on objects the parameter parser gives back without having to do `nil`
checking first.
Validate date filter parameters

- Should only allow a single value to be given
- Should produce an error if a date cannot be parsed
Refactor SearchParameterParser#filter method

Break the logic into small chunks that do one thing at a time to the
input data and gradually convert it into the right form for output,
and add the appropriate entries into `@errors` and `@used_params`.

These chunks would be suitable for extracting into separate methods
rather than leaving them all in `filter`.

Also slightly tweaks the behaviour so that invalid filters are not
returned. This won't impact the rest of the system, but is slightly
cleaner.
Merge pull request #290 from alphagov/date-filtering

Date filtering
Expand specialist document metadata from schema

When requesting extra fields such as case_type, we want to look up the
label in the schema. This commit does that by passing around the index
mappings, getting the extra fields and looking them up in the relevant
schema.