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.

Backport of 9b6b02a from stable6
Added localhost as trusted domain

Backport of f1b948d from stable6
Added unit tests for serverHost and other related functions

Backport of 98ff74a from stable6
Fixed X-Forwarded-Host parsing

Backport of d7163c9 from stable6
Merge pull request #7584 from owncloud/stable5-trusteddomainerrorpage

[stable5] Show warning page when accessing server from an untrusted domain