Elasticsearch auth enhancement

Adding auth support to use for connecting to an elasticsearch node.
Code taken from the official PHP-client for Elasticsearch (https://github.com/elasticsearch/elasticsearch-php/blob/master/src/Elasticsearch/Connections/CurlMultiConnection.php)