add js-interop phase to compiler and have it tag raw js classes
fix js.Dictionary.fromAny (add missing type param to cast)
Merge pull request #60 from gzm0/pre-reftest

Add pre-pickle phase to compiler
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.