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
Merge pull request #64 from gzm0/topic/no-type-hist

Remove calls to beforePhase for type-checks entirely.
Further, enforce nesting rules for classes extending js.Any
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.
Merge remote-tracking branch 'scalajs/master' into scala-2.11
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.
Merge branch 'master' into scala-2.11
Some new whitelisted tests, and some blacklisted b/c of time.
Fix #56: Broken boxing of Byte.
Fix #57: clone on Array[T] fails.
Merge branch 'master' into scala-2.11