[HV-838] Make resolved type cache not static.

The CDI module would probably better be served by caching a TypeResolver for the life of the extension however then it would require a dependency on classmate and that seems a bit out of scope of this fix.