QUnit: Ensure test modules are top loading

Jenkins tests for extensions were exiting with a false positive.
They were marked "success" but in fact were wrong because
it only ran the core tests, the extensions' test suite was
loaded after QUnit already stopped listening.

Change-Id: I164d60e06118b64a1c6a17665a0fb1faeff744e5
ResourceLoader: Change $module by ref instead of resetting the key

Change-Id: I8590352b52ecf51def21a9c52af85aba0f050ff8
Merge changes I8590352b,I164d60e0

* changes:
  ResourceLoader: Change $module by ref instead of resetting the key
  QUnit: Ensure test modules are top loading