perf: use pointer equality at kernel `inferType` and `whnf` caches

Motivation: when type checking big terms, we may get hash collisions
for big terms that are structurally different, but very similar.
In this kind of situation we may spend we often get hash collisions

See new test.
2 files changed