Big WagtailSearch refactor
Firstly, apologies for the giant commit

This commit contains the following changes:
 - Removed document building code from Indexed class
 - Added ElasticSearchType and ElasticSearchDocument classes to ElasticSearch backend. These help with document building
 - Filtered fields are now suffixed with '_val'. This prevents name clashes when the field is also in searchable fields
 - Queries now cast their parameters to strings before sending them to ES
 - ElasticSearchQuery now removes redundent 'and' and 'or' filters from ES query (before it added them even when they only had one child filter)
 - ElasticSearchResults len() now returns length of actual results set instead of returning the value of .count()
 - A couple more unit test cases
Added __repr__ to ElasticSearchResults
Convert to actual type instead of just converting to string
Previously, the ElasticSearch backend converted all values to strings when creating documents or queries
This commit changes this so now the ElasticSearch backend infers the type by calling .get_internal_type() on the field.
This, for example, makes IntegerFields get stored as integers and DateTimeFields get stored as dates.
To help with implementing this, I created another class called ElasticSearchField. This class helps with finding the type of the field and handling the conversion
This solves a problem where range lookups (gt, lt, etc) wouldn't work properly when used on integers/dates (as these were converted to strings previously)
For callable fields, you can now add a .search_type attribute to the function to specify a type
The ElasticSearch backend will also no longer attempt to index FileFileds
Merge branch 'master' into search-changes
Cleanup ElasticSearchQuery
Filtering across foreign keys now works
The issue was that we were storing fields in elasticsearch by their field name and not their 'attname'. These values are both different for foreign keys and querying them uses the 'attname'.
The fix was simply to index by the fields attname instead of the fields regular name.
ElasticSearch: Docs and cleanup
Use latest version of elasticsearch-py on travis and tox
Use latest version of elasticsearch-py on travis and tox
Allow None to be passed as query string
This will cause the ElasticSearch backend to produce a "match_all" query.
This is useful for testing filters
Moved search test models into wagtailsearc.tests.models
Test that ElasticSearch backend works with inheritance
Search: Fields are no longer indexed for filtering automatically.
Always index primary keys
Cleaned up search configuration format and get_search_fields
search_fields, search_predictive_fields and search_field_boost settings are now all merged together
Removed IGNORED_TYPES from type conversion (no longer needed)
Since we no longer automatically add every field to the index, we no longer need to ignore any based on their type
Give error if attempt was made to filter ElasticSearch results using a field not in search_filter_fields
Added 'title' to search_filter_fields on SearchTest model
Added backwards compatibility for old indexed_fields configuration format
Minor coding style fix