Set custom headers in HTTP responses

Hi,

this patch allows to set custom headers in HTTP responses (like setting the WWW-Authenticate header for basic auth) by adding RestRequest.addHeader() method. There are are few caveats in my opinion, which should be considered before inclusion:

Every HTTP request now instantiates a hashmap (with a predefined size of 2). I am not sure if this is a good thing, as most request (especially all the elasticsearch core ones) do not set any headers. We could alternatively use some sort of init() method and do not create the hashmap on request instantiation.

This should close #2540