Fixed JavaScriptShimRequire and be more compliant with the output of the require.js optimizer.
bundleRequireJs, when adding a define statement: Use the module name from the first incoming relation rather than the 'canonical' one so require.js won't try to load the module at run time. Previously this would break in some cases where the 'paths' config aliased the module.