[Templating|FrameworkBundle] Made `DelegatingEngine::getEngine()` public

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7254
| License       | MIT
| Doc PR        | -

As a bonus I've covered both classes with tests.