Add config for custom repository factory 

The idea is to be able to use a custom repository factory (implementing Doctrine\ORM\Repository\RepositoryFactory) so, for example, custom repositories can be resolved out of the IoC container.