TypeQualified::idents are not always Identifiers, so stop pretending they are

Use the base class (Object) instead of storing `Identifier`s that are actually TemplateInstances.

I ran into this is the D port of dmd because cast became dynamic cast and casting `TemplateInstance` to `Identifier` gave `null`.  As usual D is the sane one here and this code should die.