Support elasticsearch 1.x.x distance filter syntax

There were some *major* changes in the 1.0 release of Elasticsearch that break compatibility with haystack.
This PR is there to repair that :cake:

Cheers

Fix #957
Fix #998