Abort page restriction if no null revision can be created
In practice, this should not currently be happening: null revision can not be
created if no previous revision exists, which should not be the case where we
call the function in doUpdateRestrictions. However, since newNullRevision can
potentially return null (it's documented that way, perhaps some day in the
future, additional code paths can lead to null), we should check for it.
Also: after completing the restriction updates, the null revision is passed
along to a hook, which is documented[1] to get a Revision object. Right now,
in theory, this could be incorrect.
1: https://www.mediawiki.org/wiki/Manual:Hooks/NewRevisionFromEditComplete
Change-Id: I89b0be823d9933d557470005c390a9102f931684