Fixing issue with type refresh and structural proxies

Should cache proxies based on the real interface Class, so in case
TypeSystem is refreshed we are not reusing old proxy.

Better solution would be to clean cache when typesystem is refreshed.