[TwigBundle/DebugBundle] move dump extension & cleanups
bug #12446 [Twig/DebugBundle] move dump extension registration (nicolas-grekas)

This PR was submitted for the master branch but it was merged into the 2.6 branch instead (closes #12446).

Discussion
----------

[Twig/DebugBundle] move dump extension registration

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

An alternative fix for #12440

Commits
-------

8cf3d69 [TwigBundle/DebugBundle] move dump extension & cleanups