Some popular artifact caches (e.g. Artifactory) do not provide HTTP
CONNECT endpoints and thus aren't supported by es_proxy_host and
es_proxy_port. This patch templates out the scheme and authority
components (i.e. "https://artifacts.elastic.co" ) of the apt and
yum repo URLs to accommodate the use of such artifact caches.
Previously if the proxy host was defined but empty, an invalid proxy was
config was added and the install would fail. This is likely to occur
for instances where you conditionally set the proxy.