Fixing security Symfony issue see https://github.com/symfony/symfony/issues/3691
web: Fix infinite redirect from web/.htaccess

This bug was exposed in OSX with MAMP. The rewrite logic was causing an
infinite redirect to web/.

The exposed problem was this:

Supposing Chamilo to be installed in http://localhost/chamilo/, and
/chamilo/.htaccess to have a correct RewriteBase /chamilo/.

This was happening:
  -> /index.php calls header("Location: web/index");
  -> /web/.htaccess rewrites /web/index as index.php
  -> index.php is interpreted as /chamilo/index.php
  -> index.php redirects to web/index again...

The fix is to make sure that web/.htaccess redirects to web/index.php,
the "web/" prefix is meaningful.
Commented the MAMP line in htaccess
Restored deleted or commented functions (see cleanup changeset 3918dc8abb07)
Added extendme template to use as a base to develop new templates
Minor fix to new template
Renaming Request custom class (not used)
Fixing query
Fixing conditions.
Adding a validation if user is not set don't show information.
Using the new role approach. The user authentification now depends in the SecurityServiceProvider settings. This service depends as well in the SessionServiceProvider.
Users are login/logout using that service, we don't use anymore the local.inc.php (the cas, openid, will be disabled for now).
This service loads the user information depending in the Entity\User and Entity\Repository\UserRepository see #6257
Using Session::read instead of $_SESSION
Minor - adding commented code, format code
Adding messages when saving/updating roles using the "flashbag" $this->get('session')->getFlashBag()->add('success', "Added");
Commenting abort because now the questionmanager can only access routes in web/admin/questionmanager/
Undo return in local.inc.php
Minor composer updates
Merge branch 'master' of github.com:chamilo/chamilo-lms
Adding @todos
Hardcoding xjax URL fixes problem because of the redirections to web/main