SubmitEntityAction::undo will use the restore summary if we undo the latest page edit (as it basically restores the page version from before that edit).
This behavior is unexpected for the user, we should rather use an undo summary in these cases as well.
Patches for review:
- Original patch: https://gerrit.wikimedia.org/r/314807
- Direct follow up: https://gerrit.wikimedia.org/r/315287
- Performance optimization: https://gerrit.wikimedia.org/r/316310