Merge "Various cleanups to MediaWiki::preOutputCommit"