Checking whether the given tags can be added is permissions-related, so
it should be checked in authorizeDeletion(). Not doing so means that the
caller has to do the check, but this wouldn't work well if the user is
not allowed to add the specified tags AND to delete the page: if tags
are checked before calling deleteIfAllowed(), the caller would
presumably die with a message like "cannot add tags", but it would
make more sense to die with a message like "cannot delete pages".
Also fix broken logic in DeletePage that, when the hook error was the
empty string, caused it to be converted to an array with a single
element (the empty string), and causing the deletion to fail without
errors if mergeLegacyHookErrors is true. This shouldn't be affecting
anything, since the deprecated WikiPage::doDeleteArticleReal sets
mergeLegacyHookErrors to false.
Bug: T288758
Change-Id: Iba51fcf38efbf3acd4f89de10e4221e00043c6ca