Add @JSExportDescendentObjects to auto-export all descendent objects.

This annotation, placed on a class or trait, makes all the objects
extending it to be automatically exported, under their fully qualified
name.

This will be useful to export all objects of unit tests, for example.
Review overloads and default parameters and std library.

Sometimes, overloads that could have been written as default
parameters syntactically were not, because the underlying behavior
cannot be modeled with any default value. At a few places ??? was
used (typically for function types) because the default value would
be too cumbersome to write, but it exists.

Also, ThisFunctions have been used where appropriate.
Move scala.scalajs.js.runtime.AnonFunctions to scala.scalajs.runtime.

So that they can play with their siblings Long, RuntimeString and
StackTrace.
Use @JSExport features for the testing framework.

This way the testing framework does not relying on the Scala.js
encoding anymore, and is therefore amenable to optimizations through
DCE and/or Closure.
Add -test suffix to module name in Test for (pre)optimizeJS.

It was done long ago for the three packageJS tasks, but not
yet for preoptimizeJS and optimizeJS.
Simple test of testing example under (pre)optimizeJS.

It works for the testing example because it is small. We
cannot do the same thing for the test suite because Rhino
crashes under the load. We'll have to fix this in a later
version of the sbt plugin, but at least this commit makes
sure we won't break inherent support for testing of
preoptimizeJS and optimizeJS.
Merge pull request #339 from sjrd/review-library

Review library
Merge pull request #334 from sjrd/tests-with-optimize

Future-proofing tests with preoptimizeJS and optimizeJS
Fix #338: optionally retarget @JSExport.

The "API" to do so is to define a variable named
__ScalaJSExportsNamespace in the scope (typically the global
scope) before code emitted by Scala.js is executed. If defined
and an object, exports of classes and objects will be stored
in that object. If it is not defined, they are stored in the
global scope, as they used to be.
Fix #343: do not set scalaVersion in our sbt plugin.

Setting this dated back from the early days when only a
very specific version of Scala was supported. This does
not make sense anymore, and can be confusing if you set
a scalaVersion before importing scalaJSSettings in a
build file.
Fix #303: Reflective calls to methods on java.lang.Object

Reflective calls to java.lang.Object made the Scala.js compiler crash
because of the special handling for strings in reflective calls. This
commit fixes the issue. It also adds reflective call proxies to the JS
implementation of java.lang.Object.

Further, it emits an error message if a reflective call is attempted
on a method of java.lang.Object that is not supported by Scala.js
(e.g. wait).
Merge pull request #347 from sjrd/retarget-exports

Fix #338: optionally retarget @JSExport.
Merge pull request #348 from sjrd/dont-set-scalaversion

Fix #343: do not set scalaVersion in our sbt plugin.
Merge pull request #349 from gzm0/fix-refl-call-obj

Fix #303: Reflective calls to methods on java.lang.Object
Fix #346: Mangle underscore in member names
Fix #345: Disallow __ in JSExported names
Fix #283: Add Long overloading resolution support to exports
Merge pull request #351 from gzm0/export-fixes

Export fixes
Properly implement scalalib overrides. Fix Console for 2.11.0-RC1
Merge pull request #356 from gzm0/improve-build

Properly implement scalalib overrides. Fix Console for 2.11.0-RC1