Unify the way to provide expression functions for the DI container

Function providers registered on the ContainerBuilder are now reused by
the PhpDumper when dumping the container instead of forcing to register
them again.
Closes #13012