Unify the way to provide expression functions for the DI container

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #13012
| License       | MIT
| Doc PR        | n/a

Function providers registered on the ContainerBuilder are now reused by the PhpDumper when dumping the container instead of forcing to register them again.
I consider it as a bugfix, because the hook introduced in 2.6 is currently unusable.