Fix tests and IsDerivedFrom method
Improve object store

Depending on the implementation of GetHashCode multiple objects
may return the same hash code. This change makes use of
RuntimeHelper.GetHashCode that returns a hash code based on the
object location, so it should work better.