Create the NamespaceRestriction class and update BlockRestrictions class to support that.
Update and create tests for these changes.
Update common actions that require this functionality.
Previous change for some changes in BlockRestrictions: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/453081/