Clean up mediawiki.legacy.upload a bit more

We can merge it into mediawiki.special.upload later.

It still sets wgUploadWarningObj, because that's used in a bunch of places:
commonswiki         MediaWiki:UploadForm.js
commonswiki         MediaWiki:UploadFormTest.js
fawiki              MediaWiki:UploadForm.js
siwiki              MediaWiki:UploadForm.js
commonswiki         User:CuteHappyBrute/monobook.js
kowiki              User:Kwj2772/UploadForm.js
sqwiki              User:Euriditi/UploadForm.js

Bug: 31946
Change-Id: I4fc3dcd1f1bfb15aa130845e3de0474943b7e3fc
Merge "Clean up mediawiki.legacy.upload a bit more"