PR 13170 is caused by the parser temporarily storing attributes specified
in the class head in TYPE_ATTRIBUTES, and then removing them later if they
don't apply. As a result, we were winding up with variants both with and
without the attribute, causing confusion and death.
This patch changes the parser to store the class head attributes in a local
variable in cp_parser_class_specifier rather than in the type itself. As a
side-effect, we can remove the attribute handling from xref_tag, where it
really doesn't belong.
Tested x86_64-pc-linux-gnu, applied to trunk and 3.4. Test in
g++.dg/ext/attrib14.C.