Support changes in ES since version 1.0

Changes:

 * Adapt ESConnection.count() to use a top-level `query` parameter
 * Use `term` query instead of `text`
 * Don't expect a hard-coded `"ok": true` from response

References:

 * http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/breaking-changes.html
 * http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/_return_values.html#_return_values
 * http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/_search_requests.html#_search_requests
 * elasticsearch/elasticsearch#4033
 * elasticsearch/elasticsearch#4310

Thanks @luizgpsantos for estensive support