Doctrine uses a default ProxyClassNameResolver but it is implemented
as an anonymous class and can not be serialised. This commit adds a custom
ProxyClassNameResolver that copies the anonymous one so that we avoid using the
anonymous fallback.
[MAILPOET-3658]