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