fix Issue 12555 - Incorrect error ungagging for speculatively instantiated class

`ungagSpeculative()` should do nothing for function local symbols.
Separate class hierarchy calculation from class member semantics
fix Issue 12078 - forward reference issue with is() and curiously recurring template pattern
fix Issue 12143 - Base class is forward referenced
fix Issue 11622 - Assertion failure in totym(), glue.c, line 1288