Bug 850928 - Fix assorted JS compiler warnings. r=dholbert,dvander

--HG--
extra : rebase_source : 1d60ed741b32b3ecd3028cca11e93d601b77b01f