use HostAndPort in domain parsing

Since domain includes the scheme it's not that far fetched for it to have the port as well.  This fixes assets that are loaded with domain pointing at the wrong URL.

Fixes #2072