add js-interop phase to compiler and have it tag raw js classes
fix js.Dictionary.fromAny (add missing type param to cast)
Emit Scala lambdas as JS lambdas as much as possible.

By the time we reach the backend, anonymous functions have
been rewritten as anonymous classes extending
scala.runtime.AbstractFunctionN or their specializations.
This incurs a lot of mostly useless code in the generated
JavaScript code.

This commit adds a very ad hoc identification of a subset
of such classes that we can rewrite as JavaScript lambdas.
We then wrap them in a scala.scalajs.js.runtime.AnonFunctionN
which takes a JavaScript lambda of the appropriate arity,
and calls it in its apply method.

Not all classes resulting from anonymous functions can be
transformed, due to the ad hoc nature of the rewriting.
The most important limitation is that param accessors must
all be private and have no public accessor, which becomes
false as soon as anonymous functions are nested.
However, a sufficiently large portion of the lambdas found
in code and in particular the standard library follow the
rules of this ad hoc rewriting. Thus, the size of the emitted
code is reduced significantly, making all of this worth the
trouble.
Generalize RhinoBasedRun.

It can now use any object for the console (or none), which means
it is not tight to an sbt logger anymore.

It can also run a main method in a top-level object.
Remove call to beforePhase to check for js.GlobalScope

This eliminates all calls to beforePhase and will allow to compile
the scalalib with the scalajslib on the classpath
Add secondary constructor to js.Function to have no-arg primary ctor as required by scala-js
Add checks for js.Any class structure in frontend-phase
Fix #63: test was too restrictive for compareTo on strings.
Fix #66: emit static calls for forwarding a constructor call.

Otherwise, if a subclass defines a constructor with the same
signature, that one will be called instead.
Fix semantics of null.asInstanceOf[Int] and other primitives.

The Scala spec says that null.asInstanceOf[A] must return the
default value of type A. If A is a primitive, this means its
zero, i.e., false for Boolean, '\0' for Char and 0 for numbers.

This also fixes #53.
Fix #56: Broken boxing of Byte.
Fix #57: clone on Array[T] fails.
Re-allow js.Any ctors with arguments

Constructors with arguments to classes extending js.Any are useful and do
(at least) partially work. @lihaoyi requested the too restrictive check to
be removed until a more precise restriction is found.
Port all the missing java.util and java.lang Exceptions/Errors.