$request->server() should not auto html-escape values. header() however should.
Also introduce some tests for this behaviour.
Thanks to nn- for catching this.
PHPBB3-9716
Extend the request class with helpers for reading server vars (server())
and HTTP request headers (header()). Refactor the existing code base
to make use of these helpers, make $_SERVER a deactivated super global.
Also introduce an is_ajax() method, which checks the X-Requested-With
header for the value 'XMLHttpRequest', which is sent by JavaScript
libraries, such as jQuery.
PHPBB3-9716