resolve es api changes

https://github.com/elasticsearch/elasticsearch/issues/4310

fixes tests and makes constructor's default port more flexible