Refactor optimizer to allow for arbitrary builders
Implement System.exit() through environment setting (#958)

This commit removes support for `__ScalaJSExportsNamespace`. Use
`__ScalaJSEnv.exportsNamespace` instead.
Add option to PhantomJSEnv to not immediately terminate (fix #958)
Add direct Closure optimization (converts Scala.js IR to Closure IR)
Integrate direct Closure optimization with sbt plugin

This fixes #949
Add direct optimization support to partest
Add direct optimization support to Scalajsd
Merge pull request #967 from gzm0/system-exit

System exit
Fix #905: Show methods the optimizer worked on if it crashes

The error message will look like this:

    The Scala.js optimizer crashed while optimizing sjs_test_jsinterop_UndefOrTest$$anonfun$1$$anonfun$apply$mcV$sp$7.init___sjs_test_jsinterop_UndefOrTest$$anonfun$1
    Methods attempted to inline:
    * sr_AbstractFunction0$mcV$sp.init___
    * sr_AbstractFunction0.init___
    * O.init___
Merge pull request #973 from gzm0/optimizer-info

Fix #905: Show methods the optimizer worked on if it crashes
Merge pull request #972 from gzm0/closure-source-map

Closure source map