XWIKI-8874: Templates should not output any content to the client side when a sendRedirect has been called
* Deprecate XWikiServletResponse.getHttpServletResponse() and remove all calls to it to ensure that all our code uses XWikiServletResponse and thus that we can get the response status code.