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.