Add module wrapping code to Sentry per T513.
Currently ResourceLoader outputs something like
mw.loader.implement("modulename",function($,jQuery){<minified source code>});
This should be replaced with
mw.loader.implement("modulename",Raven.wrap(function($,jQuery){<minified source code>}));
(or the equivalent done inside mw.loader.implement) and Raven should be loaded early enough for this to work.
This might require adding a new hook or two to ResourceLoader.