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

Forward port of https://github.com/owncloud/core/pull/7565 to master.

Submitted mostly to check the new unit tests.

@LukasReschke @karlitschek