Improve layer downloading

This PR fixes bytes range detection and removes the initial HEAD request which was being used to check if the server supports bytes range.

We're now making the request for the layer right away. We check if the server supports bytes range requests and pass the response to the ResumableRequestReader.

This saves 0.5-1s for the download of every layer.
@proppy Thanks for reviewing. I've updated the code.