The purpose of this task is to allow application logic to determine restrictions (protection) imposed on a page given only a PageIdentity, without the need to have a Title object. RestrictionStore is to replace the usage of Title::getRestrictions in PermissionManager (see T208768) and other application logic.
Methods to be factored into the new service class:
* Title::loadRestrictions
* Title::loadRestrictionsFromRows should probably just be removed.
* Title::getRestrictions
* Title::getAllRestrictions
* Title::getRestrictionExpiry
* Title::getTitleProtection
* Title::isSemiProtected
* Title::deleteTitleProtection
* Title::isProtected
* Title::isNamespaceProtected - though perhaps that could go into PermissionManager
* Title::isCascadeProtected
* Title::getCascadeProtectionSources
* perhaps other methods dealing with restrictions.
The old methods should be deprecated but kept, delegating any calls to the new service.
Considerations:
* RestrictionStore should bind to PageIdentity instead of Tilte, once PageIdentity identity becomes available (see T208776). Until then, taking a Title object as input is acceptable, but it must only be used to obtain the page ID or the title text and namespace.
* RestrictionStore must not make use of the User class.