NEXUS-7575: User agent not set on HC4 tunneled connections

When HC4 tunnels HTTPS connection over HTTP, using
CONNECT, the user agent is not set even if it is configured
(HTTPCLIENT-1526). This change applies the fix
mentioned in issue comment and adds a test
that verifies it works.

Issue
https://issues.sonatype.org/browse/NEXUS-7575

CI
TBD