Currently structors of various sanitizers have internal linkage, even
with a COMDAT set. This means that semantics is not the same with LTO,
because LTO uses linkage to deduplicate and not the COMDAT. The result
is that a target built with LTO currently has numerous duplicate
redundant constructors and destructors generated by the sanitizers.
This can be fixed by marking the structor as having external linkage.
However, care must be taken to also set hidden visibility, otherwise a
DSO may not call its own structor but another, which is usually wrong.
To allow the caller full flexibility over precise linkage and
visibility, we can't just set it for the caller.
Add an assertion that checks the various rules.
Along the way, we now have to fix up ASan, HWASan, and SanCov to emit
the right linkage.
See also: https://maskray.me/blog/2021-07-25-comdat-and-section-group#grp_comdat