[FrameworkBundle] Determine templating.engine.php scope as late as possible

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11653
| License       | MIT
| Doc PR        | -
An anonymous service will be a Definition object set in the arguments directly. And yes it is allowed (it cannot be done in YAML config files though, but XML supports it, as well as PHP as you build the Definition directly)