[WIP][HttpFoundation] fix pathinfo

WIP!

Tries to fix #6634. I also compared the methods with the changes done in the upstream ZF (where also some fixes happened).
They are not the same if there is a base path. `/app_dev.php != /app_dev.php/`. That's the problem exactly.