[Typechecker] Fix duplicate diagnostics when using attributes (#28888)
* [Typechecker] resolveAttributedType() should invalidate the type repr after emitting a diagnostic, to prevent duplicate diagnostics later
* [Test] Update '@noescape' attribute diagnostics
* [Typechecker] Add a special diagnose method to TypeResolver that accepts a TypeRepr and invalidates it
* [Typechecker] Rename the special 'diagnose' method to 'diagnoseInvalid' for clarity