When the error reporting JS is called, collect environment information and add it to the error report:
- MediaWiki version (maybe extension versions as well)
- enabled gadgets and their versions (maybe - should be considered carefully due to privacy implications)
- same for user scripts
- additional information to identify which script versions ResourceLoader has cached, if the above information is not sufficient
- consider setting up some sort of hook for extensions to add error information (made-up example: for UploadWizard, the developer would want to know whether the user enabled chunked upload or not)