Elasticsearch 5: Fix issues for tests to pass
This commit fixes issues with the Elasticsearch 5 transport client and REST client bindings so that all tests pass.