Make serializer works with Doctrine Entities as Interfaces

We had this case:

- bundle core has user entity, user has avatar field
- bundle media has file entity, user avatar field is a file

So we would have a bi-directional dependency where core depends on media and media depends on core.

To avoid that case we came up with an entity interface on bundle core, after some investigation we noticed that serializer was dropping the avatar property because it was an interface and `DoctrineProxySubscriber` was failing to turn it into a class instance.

This pull request fixes this case.