Make sure we have a valid host in norm_netloc().

Previously, if we started with a URL like `http://./`, the code in
norm_netloc() would start with a host string of '.', strip the dot,
and then run into an IndexError when it attempted to look for IPv6
brackets.