writer: Don't forget data members when emitting referenced types
When emitting a type referenced type in the ABIXML,
write_decl_in_scope just emits markup for the opening (and closing)
tags for the scopes up until the actual referenced type. Then the
referenced type is emitted.
But then if the referenced type is a member type of a class A, for
instance, the other data members of that class are not emitted. That
can cause the data members of A to be missing. Oops.
To fix that, if a scope of the referenced type is itself a type,
write_decl_in_scope now emits the full type.
* src/abg-writer.cc (write_decl_in_scope): If the scope of the
decl to write is a type that was not yet emitted, then emit it in
full. Otherwise, just do things as we were doing previously.