Fix #1028: A helper for Object.getClass().
Future-proof #1027: add a helper for identityHashCode().

This still returns 42 for all objects. But with this refactoring,
we'll have the possibility to change that in a completely
binary compatible way.
Merge pull request #1044 from sjrd/helpers-getclass-hashcode

Helpers for getClass and identityHashCode