Fixes #6156 Redirect /index.php/.whatever?... to /index.php?...

See #6156. `/index.php/.html?...` URLs can be interpreted by old browsers using the extension instead of the Content-Type header. This redirection should prevent that.

The part that does the redirection is in the `FrontController` (just before the dispatching). If there is a better place for this (to avoid crowding up the front controller) let me know.

I have also added a simple PHPUnit test for this. I ended up using `curl` manually because the `Http` class doesn't return the HTTP response headers. If I missed how to do that properly with `Http`, let me know too.
Yeah if we had an architecture like Symfony's HttpKernelInterface with Request/Response objects instead of global state, that would be so easy to test!

But even if the regex was in a separate class and with unit tests, I would still be in favor of keeping integration tests: this is supposed to prevent a XSS, so we need to make sure that it works at a high-level (i.e. testing the front controller directly too). And that integration test would not necessarily mean using the network, but right now we don't have another option I'm afraid.

So I can add a unit test by moving the regex stuff in a separate class, but I suggest also keeping the current network test and moving it to integration tests?

> Core tests do not use the database, and I think should not use the network (there are 2 existing tests that do). 

My bad I don't know why I thought most of them were using the network :S