When the hostname is an IPv6 literal, encapsulate it

with [brackets] before calling Net::HTTP  [rt.cpan.org #29468]

See also https://github.com/libwww-perl/net-http/pull/10 to complete IPv6 support 
for LWP's HTTP/HTTPS modes.

IPv6 addresses rarely have '.' where host names often have '.' - hence checking only against :

It appeared to me that by the time this code was reached in LWP that the port number was already removed; so the port number is not causing a ':' here. 

The naive assertion is that if the host (at this point in the code) still has a colon it is an ipv6 address.  

I suppose this could be wrong for non-INET related addresses.

Any other recommendation on how to limit this bracket wrapper; to detect that it is an IPv6 literal without a nasty regex?

The original IO::Socket::INET may actually fail. But it would fail anyways..