Implement java.lang.Class in Scala.

And other simplifications of the core js lib.