Add support for x-forwarded-host header

If the proxy is behind a proxy itself (like apache or nginx) `req.headers.host` points to `localhost`. This change prefers the [custom header `x-forwarded-host`](http://stackoverflow.com/questions/17085516/which-headers-should-a-proxy-send-x-forwarded-host-vs-x-host) over `req.headers.host` if it is defined.

This is especially important if the proxy runs on shared hosting where you usually can't just bind anything to a port.