Backport Fix #364 for good: remove magical Rhino top-level package objects.

Instead of hard-coding a list of known problematic top-level
package names, we detect what needs to be removed by listing
the properties in the Packages object.

Backport: In 0.5.x, the LiveConnect classes were removed before
loading env.js (unlike 0.6.x). This change has been introduced in
1f3f1cb4e8e05de3913813e2d8747ed6601fc2fa in the 0.6.x branch due to
issues with env.js. The backport changes the order of these steps in
the 0.5.x branch as well.

(cherry picked from commit 856029644aa01c16b2df0c7e696615e956b55eec)

Conflicts:

	sbt-plugin/src/main/scala/scala/scalajs/sbtplugin/env/rhino/RhinoJSEnv.scala
Backport Add replace and deleteCharAt methods to StringBuilder and StringBuffer

(cherry picked from commit 20973bc986ccaf78082e00dd0fd7380a9c630cac)
Backport Use a Traverser in JSASTTest instead of a Transformer.

(cherry picked from commit 4752db29e17d5960b18b4aab73c34f83b01a486d)
Backport Using a Transformer in scalajsp is overkill.

It only needs to transform the top-level node, so a simple
function is enough.

(cherry picked from commit 47408a5f65e1243dda35449be5117bce102ef429)

Conflicts:

	cli/src/main/scala/scala/scalajs/cli/Scalajsp.scala
Backport Fix #1206: Update to sbt 0.13.6

Also fix the sbt version for the sbt-plugin-test build.

(cherry picked from commit 11c29f9c138a700657258617e3ac233a1fa9bbe7)