mediawiki.api.test: Use sinon sandbox for unit tests
Make the unit tests faster and more standalone:
* Don't make a request to the actual API, instead provide the
response via the fake server and purely test the mw.Api interface.
* No need for promise aggregration since the process is now
synchronous.
* No arbitrary delays for async or animations etc. as sinon
artificially fast-forwards setTimeout, Date and others for us.
Also:
* Move assertion for API error handling to separate test.
Change-Id: I20b17f256bc5114c6c2c3185653973076c15bc02