Optim: clear the ProducedTypeCache when we change a TypeDeclaration's inheritance due in SupertypeVisitor
Optim: fixed ProducedType cache hashCode/equals for non-toplevels

Turns out that we can't use the qualified type name for local declarations which do not
have a unique qualified name
Optim: removed commented out line
SupertypeVisitor: added a FIXME for @gavinking for something which is most likely dead code