[Templating] deprecate DebuggerInterface

set logger in extension , so its only done in debug mode
add psr/log to suggest of templating
add test for setLogger and refactor tests to not depend that much an
deprecated functionality
Merge branch '2.3' (closes #8956)

* 2.3:
  [HttpFoundation] removed extra parenthesis
  [Process][2.2] Fix Process component on windows
  [HttpFoundation] improve perf of previous merge (refs #8882)
  Request->getPort() should prefer HTTP_HOST over SERVER_PORT
  Fixing broken http auth digest in some circumstances (php-fpm + apache).
  fixed typo

Conflicts:
	src/Symfony/Component/Process/Process.php
Fix testIdleTimeoutNotExceededWhenOutputIsSent on windows
[Console] Improved xml generated when listing commands
merged branch deguif/console_xml_list_improvement (PR #8928)

This PR was squashed before being merged into the master branch (closes #8928).

Discussion
----------

[Console] Improved xml generated when listing commands

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

I marked this PR as a BC break, as it breaks the xml schema generated by the command __app/console list --xml__

It replaces the first node (currently _symfony_) by a more generic node name ( _application_ ) and adds the application name and application version if specified in the _Symfony\Component\Console\Application_ constructor.

Before (using composer console that uses symfony console component):
```
<?xml version="1.0" encoding="UTF-8"?>
<symfony>
    ...
</symfony>
```

After (using composer console that uses symfony console component):
```
<?xml version="1.0" encoding="UTF-8"?>
<application name="Composer" version="x.x.x">
    ...
</application>
```

Commits
-------

7958227 [Console] Improved xml generated when listing commands
[Console] reverted change in the XML root name (refs #8928)
merged branch Tobion/deprecate-debuggerinterface (PR #8929)

This PR was merged into the master branch.

Discussion
----------

[Templating] deprecate DebuggerInterface

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes: deprecated DebuggerInterface and Debugger
| Tests pass?   | yes
| Fixed tickets | #8926
| License       | MIT

- [x] add suggested optional dependency in templating component to Psr log
- [x] remove ProjectTemplateDebugger from tests

Commits
-------

b853438 [Templating] deprecate DebuggerInterface
added a RequestStack class
[HttpKernel] changed request_stack to a private service
[HttpKernel] renamed the kernel finished event
[HttpKernel] tweaked the code
[HttpKernel] modified listeners to be BC with Symfony <2.4
moved RequestStack to HttpFoundation and removed RequestContext
[Security] made sure that the exception listener is always removed from the event dispatcher at the end of the request
merged branch fabpot/request-stack (PR #8904)

This PR was merged into the master branch.

Discussion
----------

Synchronized Service alternative, backwards compatible

This is a rebased version #7707.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7707
| License       | MIT
| Doc PR        | symfony/symfony-docs#2956

Todo/Questions

 - [x] do we deprecate the synchronize feature (and removed it in 3.0)?
 - [x] deal with BC for listeners
 - [x] rename RequestContext as we already have a class with the same name in the Routing component?
 - [x] move RequestStack and RequestContext to HttpFoundation?
 - [x] update documentation

Prototype for introducing a ``RequestContext`` in HttpKernel.

This PR keeps the synchronized services feature, however introduces a ``RequestContext`` object additionally, that allows to avoid using synchronized service when injecting ``request_context`` instead of ``request`` into a service. The FrameworkBundle is modified such that it does not depend on synchronized services anymore. Users however can still depend on ``request``, activating the synchronized services feature.

Features:

* Introduced ``REQUEST_FINSHED`` (name is up for grabs) event to handle global state and environment cleanup that should not be done in ``RESPONSE``. Called in both exception or success case correctly
* Changed listeners that were synchronized before to using ``onKernelRequestFinished`` and ``RequestContext`` to reset to the parent request (RouterListener + LocaleListener).
* Changed ``FragmentHandler`` to use the RequestContext. Added some more tests for this class.

* ``RequestStack`` is injected into the ``HttpKernel`` to handle the request finished event and push/pop the stack with requests.

Todos:
* RequestContext name clashes with Routing components RequestContext. Keep or make unique?
* Name for Kernel Request Finished Event could be improved.

Commits
-------

1b2ef74 [Security] made sure that the exception listener is always removed from the event dispatcher at the end of the request
b1a062d moved RequestStack to HttpFoundation and removed RequestContext
93e60ea [HttpKernel] modified listeners to be BC with Symfony <2.4
018b719 [HttpKernel] tweaked the code
f9b10ba [HttpKernel] renamed the kernel finished event
a58a8a6 [HttpKernel] changed request_stack to a private service
c55f1ea added a RequestStack class
Added option to show controllers optionally in the router:debug command
merged branch peterrehm/router-command (PR #8657)

This PR was squashed before being merged into the master branch (closes #8657).

Discussion
----------

Added option to show controllers optionally in the router:debug command

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Added option to show controllers in the router debug command as a convenience function.

    app/console router:debug --show-controllers

Commits
-------

6fd32f3 Added option to show controllers optionally in the router:debug command
[Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
[Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted