[clang][ExtractAPI] Fix handling of anonymous TagDecls (#87772)

This changes the handling of anonymous TagDecls to the following rules:
- If the TagDecl is embedded in the declaration for some VarDecl (this
is the only possibility for RecordDecls), then pretend the child decls
belong to the VarDecl
- If it's an EnumDecl proceed as we did previously, i.e., embed it in
the enclosing DeclContext.

Additionally this fixes a few issues with declaration fragments not
consistently including "{ ... }" for anonymous TagDecls. To make testing
these additions easier this patch fixes some text declaration fragments
merging issues and updates tests accordingly.

rdar://121436298

GitOrigin-RevId: 2bcbe40f8a1c6cc9a256711261d8aa8fde50f7b3
14 files changed