resourceloader: Optimise mw.loader.register()
* Remove redundant 'len' variables. This is a dated micro-optimisation
that is no longer useful and can actually have an adverse effect.
* Remove [.length] assignment. Use native push() instead.
* Remove JSLint-ism of "i += 1" instead of "i++".
* Remove redundant 'delete' operation for local 'unresolved'
object. This falls naturally out of scope. Mutating this object
to save memory probably wastes more cycles than it saves.
Change-Id: Ib3cb40d2fef696078bd64585db9498326f08b2d2