Append port number to Host and Origin header, only if specified in the URL and non-default.

It is HTTP convention to exclude the port number in the Host header when it is the default.

Reference:  http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23

This patch causes the port number to only be appended when the port was given in the parsed URL and when the port number is non-default.  For default port numbers (most of HTTP), this slightly reduces the number of bytes on the wire, but allows for more simple header matching algorithms on the server-side.