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 ===).


What is the third case? Is this just a function object? If so, we should not use the toString as the key since that is not unique.

I understand that the goal here is memoization but without a real Map we cannot do this. If we are fine mutating the object we can add a uid. Another alternative is to use the Map polyfill.