Tougher validation for parsing urls from HTTP headers. Fixes #2767.
Handle HTTP minor versions greater than 9

(In practice they don't exist, but so long as we're making changes for
standards compliance...)

Also add several more unit tests for good and bad URL types.
Merge remote-tracking branch 'public/bug2767'