mediawiki.js: clean-ups
* Inline canExpandStylesheetWith().
* Make resolve() take an array of module names instead of being flexible
(taking either a string or an array). It's a private method, so it doesn't
need to have a cute API.
* Use simple string concatenation rather than [].join in pad()
* Make allReady() more efficient by having it bail early as soon as any
non-ready module is encountered.
* Add anyFailed(), which is a complement to allReady().
* Remove filter(). In more than one place, it was used to check whether a
module in some specified state existed in a list of modules, which is
inefficient, since filter() continues iterating through the array of modules
after finding a match and because it constructed an array with the matches,
which was not needed.
* Replace some verbose array iteration with $.grep / $.map / $.each.
Change-Id: I22a2f824488ba39d03b546ac8560f551a3198d7f