Edit via the API instead of WikiPage::doEditContent.

The API will automatically check permissions and other sanity checks that we would have bypassed.
We are forced to override the global $wgUser since EditPage uses it when figuring out who is editing.
Any errors raised by the API will be logged to Special:Log.

Change-Id: Ib51f2f4a65a45d70e278c13c198733fd47bc3229
Merge "Edit via the API instead of WikiPage::doEditContent."