[cxx-interop][IRGen] Emit type metadata accessors correctly
This change makes sure we correctly emit IR for type metadata accessors for C++ reference types.
This fixes linker errors when a type metadata of a C++ reference type is used in multiple object files that are later linked together, for instance, if a C++ reference type is conformed to different Swift protocols in different Swift source files:
```
duplicate symbol 'type metadata accessor for __C.SharedObject' in:
main.o
second.o
ld: 1 duplicate symbols
```
rdar://129027705
(cherry picked from commit a5ce0dc81dfe64ed633735a7a881d48d5418a486)