This is a general ticket for using servics allowing to access entities from multiple repositories in Wikibase client. Tickets for more specific implementations related tasks should be created as subtasks.
* ClientStore implementation is not changed,
* existing ClientStore implementation, ie. DirectSqlStore should be using dispatching versions of services instead of single-repo ones it uses now
* factory of services should be created for providing list of service instances for creating dispatching services to DirectSqlStore.
* This factory would have a public interface partly reminding the one of ServiceContainer, ie. it would have a generic method getServiceMap (name is subject to change) returning a map in form [ repoName => service ] of services configured for particular repository. It could also have convenience getters for particular services.
* the factory class would have a required configuration of foreign repositories (what repos are configured, what are DB names, URLs etc)
* there should be class extending ServiceContainer that will be returning all services for a single repository. This container will use wiring file instantiating actual service classes
* ServiceMapFactory would use a RepositoryServiceContainer for each repo to generate a service map
* services that return entities coming from a foreign repo, in particular implementations of EntityRevisionLookup, must apply the correct ID mapping for that repo during deserialization.
* for managing a set of service instances for a given repo, consider using a ServiceContainer. We should consider changing WikibaseClient to use core's new ServiceContainer mechanism alltogether.
* the ability to load e.g. labels for entities on another repo will be needed by repo code, not just client code. We will have to re-consider the relationship between repo and client once more.
* in the long run WikibaseClient should also become a ServiceContainer but this is something which out of scope of this task