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