[ubsan] Add deduplication functionality, always enabled.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171948 91177308-0d34-0410-b5e6-96231b3b80d8
[ubsan] Drop use of __atomic_exchange_n for now to fix build for some.

Need a more reliable way to check for support of this intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171955 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix crash when user defines own fopen/fileno


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171958 91177308-0d34-0410-b5e6-96231b3b80d8