feat(runtime): add memoization to genericType()

This is an initial implementation (lacking unit tests).

The rationale is that we need `genericType(Foo, Bar) === genericType(Foo, Bar)` for the Dependency injection in Angular.

Before this PR it was not possible to detect when two generic types match (as they are not ===).


I'll add it.

Is this code fine if `key` is a ctor ? (`getTypeKey(Klass)` -> ctor)