SI-1448 Unify casting behavior for AnyVals

Casts of AnyVals had inconsitent behavior depending on whether they
were boxed:

    1L.asInstanceOf[Int]        // -> 1
    (1L: Any).asInstanceOf[Int] // -> ClassCastException

This commit fixes this by adapting the unboxing helpers in
BoxesRunTime. A couple of caveats:

- Unboxing requires an additional instanceof check. (Reason: Casting
  of Character, which is not subtype of Number).
- A wrong ClassCastException is raised on a failed cast to a primitive
  numeric value. It says "cannot cast to Number" instead of Integer
  etc.