mediawiki.api: add postWithToken and getToken

Similar to postWithEditToken in mw.api.edit, but more generic.

Change-Id: Ic2af66b91a996bc9b46dc3e999b4099541573b08
Merge "mediawiki.api: add postWithToken and getToken"