Fix redirection to login page after install

When installation is started from login page (redirected to install from
core.php), the link to 'Continue to log into Mantis' goes back to
install page instead of login page.

Resolved problem by adding a no-cache header.

Also changed Location header response to 307 instead of default 302.

Fixes #16510