Fix #1247: Adapt getClass for primitives to Scala.js subtyping

Note that the checkfile override for run/t6318_primitives.check for
Scala 2.11.0 and 2.11.1 has been wrongly introduced in
efe48f93214f376d99e6409fe94acba0af45d620. This commit both fixes the
mistake and adapts them for the change.
Merge pull request #1254 from gzm0/getClass-of-number

Fix #1247: Adapt getClass for primitives to Scala.js subtyping
Fix #1241: Add Future based API to AsyncJSEnv
Merge pull request #1255 from gzm0/async-future

Fix #1241: Add Future based API to AsyncJSEnv
Implement part of java.nio.{Byte,Char}Buffer.

These are required to implement Charset encoders and decoders.