Overrided the es_result method and added the build_es_query method
Merge branch '111155-case' of github.com:lwyszomi/commcare-hq into build_es_query
Remove uneeded code in es query
Merge pull request #3325 from dimagi/build_es_query

Merge in 3295 with minor changes