Enclose every JS file in per-file closures

Per https://www.mediawiki.org/wiki/CC/JS#Closure

Also made sure the style was pretty consistent.

Bug: 53067
Change-Id: I0db18f24af2dc145f517e9844ef29ac5ad01b687
Merge "Enclose every JS file in per-file closures"