New encoding of method names to make identifiers.

In order for Closure Compiler to rename method names, they
have to be identifiers, and selected with dot selection.

This new encoding ensures that all members (fields and
methods) are encoded as identifiers.
$-mangle JavaScript bridges, so they are identifiers.

If they are not identifiers, they cannot be renamed nor
eliminated by Closure Compiler.
Tighten uses of Select and PropertyName.
Always emit []-select for calls to JavaScript.

This will prevent Closure Compiler from renaming these
symbols.
Enable class and module symbol renaming.
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).
Restored parentData field in data.
Better codegen for translated match.

Use a labeled block instead of a labeled do..while(false) loop.
Use classes for runtime type data.
Fixed bug in codegen of tail calls.
Better encoding of implementation classes.

They are now encoded truly as repositories of static methods.
Before they were encoded as if they were modules, aka top-level
objects.
Generate dynamically the dynamic instance tests.

Instance tests for classes are now created twice:
* once statically by the codegen under namespaces
  ScalaJS.is and ScalaJS.isArrayOf, for use by the
  codegen for calls to isInstanceOf[] and
  asInstanceOf[]
* and once dynamically by the ScalaJS.ClassTypeData
  constructor, for use by the dynamic instance tests
  accessible through Class.isInstance() and
  Class.isAssignableFrom().

The good point is: the static version need not be passed
to the ClassTypeData constructor anymore. Hence, for any
given type, if there is no static call to
is/asInstanceOf[A] for that type (which happens a lot),
it can be dce'ed.
Do not emit useless constructors.
Added a task optimize-js which calls the Closure Compiler.

Now, the optimized versions of the examples can be
generated with

sbt> examples/optimize-js

This task calls the Google Closure Compiler to perform
its Advanced Optimizations on the examples' code.
Merge branch 'be-closure-friendly'