[ticket/11997] Correctly redirect to front controllers

We currently do a lot of checks in order to prevent users from getting to
a 404 page. However, this logic relies on checking if a file or folder exists.
Due to the front controllers and the URL rewriting in 3.1, it is no longer
possible to rely on existing files for redirecting. This patch will take
care of properly redirecting users to front controller files. An incorrect
link will cause users to get a 404 error though.

PHPBB3-11997
[ticket/11997] Remove obsolete if statement in phpbb_own_realpath()

PHPBB3-11997
[ticket/11997] Rename root_dirs_size to superordinate_dirs_count

This variable name better fits what is done with it. A comment explaining
why 2 has to be subtracted from the size of root_dirs has also been added

PHPBB3-11997
[ticket/11997] Use $phpbb_filesystem->clean_path() for proper redirect paths

PHPBB3-11997
Merge branch 'ticket/11997' of https://github.com/marc1706/phpbb3 into ticket/marc/11997

# By Marc Alexander
# Via Marc Alexander
* 'ticket/11997' of https://github.com/marc1706/phpbb3:
  [ticket/11997] Use $phpbb_filesystem->clean_path() for proper redirect paths
  [ticket/11997] Rename root_dirs_size to superordinate_dirs_count
  [ticket/11997] Remove obsolete if statement in phpbb_own_realpath()
  [ticket/11997] Correctly redirect to front controllers
[ticket/11997] Fix missing global

PHPBB3-11997