[rtsan] Support legacy pthread_cond variables (#152947)
fixes #146120
Follows a pattern put forward in tsan:
https://github.com/llvm/llvm-project/blob/71ffa2a4d3c220c97fbffa6078a446cc17bbaada/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp#L1366-L1371
https://github.com/llvm/llvm-project/blob/71ffa2a4d3c220c97fbffa6078a446cc17bbaada/compiler-rt/lib/tsan/dd/dd_interceptors.cpp#L204-L208
To properly deal with memory corruption on older versions of
pthread_cond variables.