Replace promise handling when AfD'ing pages
Replace promise handling when AfD'ing pages

Fixes a race condition where the page reloads before the browser is able to
save an edit to the AfD page. The entire promise chain is now properly
returned and waited for and the reload does not happen unless all promises
in the chain (from `logPage` to `addToLog` to `discussionPage` have all
resolved). This has the side effect of also delaying page tagging and user
notice sending, so a small slowdown on the user side might happen. Rewriting
the code to make everything happen all at once will require a refactor, and
I'd rather have this patch out immediately due to its urgency.

Bug: T238025
Change-Id: Id7272f5e19f1c64a425cd114f11e3f306b922b2b

wikimedia/mediawiki-extensions-PageTriage,wikimedia/mediawiki-extensions-PageTriage,wikimedia/mediawiki-extensions-PageTriage