Fix transport URL ipv6 parsing support

Just copies code from Nova's cells code.

See I6b18f7643ab694f5ff34206b80865c40b1ec2680 for where this code was
first introduced.

Change-Id: If9b1503ed47f5910c0ab44edfbe3f42fcce9bf18