Register jQuery as a CommonjS async module

There are a couple browser-based CommonJS-friendly loaders (RequireJS, Yabble) that can load modules that use an ​async module format.

Ideally jQuery would register itself as a module using this format. This would allow jQuery to participate in browser module loading with these compatible loaders. Right now a patched version of jQuery is needed to accomplish this behavior. This approach also makes it easier for script loaders to use the new jQuery.readyWait feature to indicate other async scripts are loading and to not fire the jQuery ready callbacks until the scripts finish loading.

I did a small update to the pull request, registering jQuery as a named module. I used "jquery" instead of "jQuery" since the module IDs in CommonJS are normally mapped to file names at some point, and normally jQuery is distributed via file names that are in lowercase.

I made the change so that jQuery is more robust to mixing in environments where anonymous modules are supported but used alongside library code on the page that may have combined jQuery in with other scripts or modules using optimization strategies that are not aware of anonymous modules. When combining multiple anonymous modules together in a file, the combination process needs to be sure to give each anonymously define()'d module a name.

However, there will be many people using jQuery that use script combination processes that are not aware of anonymous modules, so it is best to name jQuery's define()'d module. This will allow it to work well in pages that mix anonymous-unaware code with other anonymous-aware code.

This is the same approach I recommend for any jQuery plugins that want to optionally opt-in to define()ing a module, and something I advocated recently at the online jQuery summit conference.

It has *just* the changes needed for this ticket, and specifies a special define.amd.jQuery capability flag that is used to indicate if the AMD loader can deal with multiple versions of jQuery calling define. See the pull request for more info, and matching tests/changes in RequireJS to work with capability flag.