Fixes for most JSHint warnings

Bug: 47161
Change-Id: I02772c5c7e570a549b859840ef13f708817661e6
GitHub: https://github.com/wikimedia/mediawiki-extensions-UploadWizard/pull/1
Merge "Fixes for most JSHint warnings"