Merge pull request #1219 from gzm0/backports

Backports 0.6.x to 0.5.x
Backport Fix #1154: Add @JSExportDescendentClasses (exports subclass ctors)

Backport:
- Fix stub project specifically for 0.5.x.
- Adapt package name in ExportsTest for 0.5.x:
  scala.scalajs.{testsuite => test}.jsinterop
- Fixes #1249 (backport ticket)

Manual Backport from 698d69814eb250656f076eda494397e649bb0f78:
- Add method `decodedFullName`
- Adapt ad-hoc test detection to not "load" classes

(cherry picked from commit b128e480ec8adc6bf1b095de37da725aeebe1c62)

Conflicts:

	stubs/src/main/scala/scala/scalajs/js/annotation/ExportAnnotations.scala
Backport Fix #1224: Don't use deprecated reporting methods

(cherry picked from commit c19396933ebfc157b96e530c813c974555c5e186)

Conflicts:

	compiler/src/main/scala/scala/scalajs/compiler/GenJSCode.scala
	compiler/src/main/scala/scala/scalajs/compiler/PrepJSInterop.scala
Backport Fix #1252: Missing asInstanceOf's/unbox'es in scalajsenv.js.

Only one was really a danger, i.e., the result of charCodeAt()
in charSequenceCharAt() with an out-of-bounds index. The others,
being calls to methods of primitive data types, are hardly a
problem, because the implementations cannot return wrong results.
(Of course, they could be overwritten by an evil user, so it's
better to check them.)

Backport: Add unboxes in String.hashCode manually.

(cherry picked from commit 39708c23ef4355db18ae34533dab45ee1e0b7083)

Conflicts:

	tools/scalajsenv.js
	tools/shared/src/main/scala/scala/scalajs/tools/optimizer/Analyzer.scala