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.
NEXUS-7575: Using context in UA formatting

To have available all potential user customizations.
Merge pull request #803 from sonatype/nexus-2.11.x-NEXUS-7575-proxy-tunnel-ua

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