AST: Introduce TypeBase::hasPrimaryArchetype()
The existing hasArchetype() is now deprecated. It is equivalent to:
hasPrimaryArchetype() || hasLocalArchetype()
Callers should be changed to check one or both of the above predicates
in the most precise way possible.