[BUGFIX] Fix redirect to install tool in new installations

When setting up a new TYPO3 installation, TYPO3 should redirect
to the install tool, when accessing the frontend or backend.

This redirect fails since introduction of the trustedHostsPattern
since no configuration is available at this point, while the
request itself is a BE or FE request, which will be denied in this
case.
Solution is to set the REQUEST_TYPE to INSTALL before doing the redirect
to install tool so that creating the redirect is allowed.

Resolves: #59087
Releases: 6.2, 6.1
Change-Id: I31bcbc20fa1c9bca0d6bf2b940bf26b9affe893b
Reviewed-on: https://review.typo3.org/30487
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters