resourceloader: Add to debug mode the same 'jquery' clause as for prod
=== module.exports
Follows-up
dec800968e, which added a clause for `window.$` inside runScript()
that ensures require/module.exports is not given to 'jquery'.
This commit adds the same clause to debug mode handling, which follows a
different code path. Without this, jquery.migrate.js execution throws from
`require('jquery')`, when viewing a page in debug mode.
=== mediawiki.legacy.wikibits
Before
dec800968e, 'jquery' was a raw module and not allowed as dependency,
and before that commit base modules did not follow debug mode. Instead,
they were always combined in the same request (even in debug mode), with
only the order in the query string dictating their execution order.
After that commit, it is mandatory for base modules to express their
execution order through dependency links. This was done for 'mediawiki.base',
but forgotten for 'mediawiki.legacy.wikibits'. That module isn't used by
default, but becomes used when enabling $wgIncludeLegacyJavaScript, which
is off by default, but on for Wikimedia wikis.
Bug: T192623
Change-Id: Id4fbfee71deeb9528e8a622604d4cd972dd25d3b