Implement mediawiki.confirmCloseWindow module

Copied from UploadWizard, removed there in I9411a6d33.

Change-Id: I5d35b6fddd73cf56371eeda299ee0779cb40397a
Add window close warning to Special:Upload

Change-Id: I43bf828654d342893a19656ddd4151c2558d2f63
Merge "Implement mediawiki.confirmCloseWindow module"
Merge "Add window close warning to Special:Upload"