Added a caster for doctrine collection

This was rejected in the Symfony PR because it has side-effects: it initializes lazy collections