[Bridge][Twig] Pass locale to the ControllerReference - Fixes #6932

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6932 
| License       | MIT
| Doc PR        | -

The fix consists in passing the locale in the controller reference,
by making the controller twig function aware of the current context.
There are a few additional checks for the request scope, in order
not to break compatibility when using the console.