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

Note that the checkfile override for run/t6318_primitives.check has
been introduced wrongly in efe48f93214f376d99e6409fe94acba0af45d620.
This commit both fixes the mistake and adapts them for the change.