Added RepositoryFactory [#891]

Added RepositoryFactory in the same way as in ORM and PHPCR. It will give the ability to inject additional services or parameters into Repository.