Turned $ScalaJSEnvironment into a "namespace" ScalaJS.

This allows Closure to flatten the namespace. However,
for some reason it does not when everything is bundled
together, although it works when the scalalib is omitted.
Solving this is for later.
Yeeha! Changed global encoding to support dce via Closure.

The general encoding of interfaces, classes, arrays, instance
tests, etc. has been completely changed and rewritten.
This new version allows the Closure Compiler to perform its
global dead code elimination and namespace flattening.

This does not yet provide an automated application of
Closure to the emitted code. In this transient state,
scalajs-runtime.js is actually way bigger than before (40 MB).