This PR makes sure to sanitize the Host header value across all requests.
This means that all of these examples now correctly return the same URI and also the same Host header value example.com without the default port in this case:
GET / HTTP/1.0\r\nHost: example.com\r\n\r\n
GET / HTTP/1.0\r\nHost: example.com:80\r\n\r\n
GET http://example.com/ HTTP/1.0\r\n\r\n
GET http://example.com:80/ HTTP/1.0\r\n\r\n
Also, HTTP/1.0 allows requests with no Host header at all. In this case, it will simply use the local socket address as the host value. This ensures that getUri() always returns a full URI.
This PR may look a bit heavy, but most of the changes are actually added tests and some of the existing URI validation logic moved from the Server to the RequestHeaderParser.