Add support for reverse proxies.

-  Changed GetHostName logic to look at X-Forwarded-Host header instead of the X-Forwarded-For header. The [X-Forwarded-For header] (http://en.wikipedia.org/wiki/X-Forwarded-For) represents the client ip address.

-  Added support for retrieving port from forwarded requests (using X-Forwarded-Port or X-Forwarded-Proto) as well as the ability to specify which to use via options.