Show warning page when accessing server from an untrusted domain

Added early check for the requested domain host and show a warning
page if the domain is not trusted.
Added localhost as trusted domain
Added unit tests for serverHost and other related functions
Fixed X-Forwarded-Host parsing