Clean up JS

* Reformat
* Kill apiRequest and use core's mediawiki.api
* Kill uses of $.get( mw.util.wikiScript( 'api' and use core's mediawiki.api (where possible - see I3a8ae7a4)
* Kill getToken and use mw.user.tokens.get( 'editToken' ) (Also get rid of the server-side part of that)

Change-Id: I006ffbe720e8c59596bdc27a55cab95968affac5