Allow to inject object repository

This is related to this : https://github.com/doctrine/DoctrineModule/pull/114

Note that DoctrineMongo should be updated too.