A few more improvements to the hostspec-parsing code.