User: Migrate from foreign cache to global cache for UserRightsProxy
Avoid having one wiki access another wiki's local keyspace.
Instead, use the global keyspace to share values across wikis.
Also, imitating wfMemcKey from wfForeignMemcKey was semantically
incorrect due to $wgCachePrefix having precedence. Most interfaces
(e.g. UserRightsProxy, FileRepo, JobQueue etc.) only have access
to the wiki id (dbname + prefix). The local cache configuration
for wgCachePrefix is not and shouldn't have to be exposed.
Start enforcing that local cache keys are left private and
to share keys, one must use global keys.
Global keys (prefixed with "global:") have their own space and we
can use the wiki-id as regular key segment for keys about users.
Also:
* Expose a method to keep formatting of this key in one place.
As it used used in many different places in core, as well
as in CentralAuth.
* Make use of wfWikiId() in getDefaultKeyspace() to avoid
duplicating this logic.
Change-Id: I58836a24b9e239f460ab489bd2fe8ced8259833c