This fixes cases where dynamic classes produced RTTI data with external linkage, producing linker errors about duplicate symbols.
This touches code close to what was changed in SVN r244266, but this change doesn't break the tests added in that revision.
The previous version had missed to update CodeGenCXX/virt-dtor-key.cpp, which had a behaviour change only when running the testsuite on windows.