Set JS strict mode

Avoid it on purpose in test/karma.conf.js and test/loader.js because
there are no functions there, only settings.

Also fix errors that were silenced before:

- if not using 'new' to instantiate a class, JSHint throws: "Missing
  'new' prefix when invoking a constructor"

- Console errors: "strict mode forbids implicit creation of global
  properties".  Some variables missed 'var'.