Cleanup: missing "var"s, unused locals, etc.

Minor cleanup:
- add some missing variable declarations.
- add a few mising semicolons.
- remove some unused variables.
- remove two "var"s that had no effect (redeclaration of already
  existing variable "files" in mw.UploadWizardUpload.js)

mw.ApiQueryImageInfo.js appears to be unused; there are more specialized
functions in UploadWizardUpload for this. It is also not in the
ResourceLoader modules. And its implementation appears buggy
(function success() is unused.) File deleted.

Change-Id: Idd0067b58fd1d9d5cbe45b66e54ac12ed65e81b8
Merge "Cleanup: missing "var"s, unused locals, etc."