[Debug] DI controllable ErrorHandler::register()

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #12327
| License       | MIT
| Doc PR        | -

This enhances the `ErrorHandler::register()` signature in a BC way, allowing greater control.

See https://github.com/symfony/symfony/pull/12330/files?w=1