LPS-48728 (not for review) Refactor repository factories

Refactoring starts at commit 16ace48.
In the last commit (d0641af) the RepositoryCreator interface is removed and its usages replaced by RepositoryFactory.