tsan: fix pthread_cond interceptors
currently tsan hangs when linked with a shared library linked against an old version of pthread
this change is another attempt to fix pthread_cond interceptors in different scenarios
see the comment for implementation details



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