[TSan][libdispatch] Port gcd-sync-block-copy.mm to C++

Summary:
Apparently, it makes a difference on where a block lives depending on if
it's passed "inline" versus assigned and then passed via a variable.
Both tests in this commit now give a signal, if `Block_copy` is used in
`dispatch_sync`.

Since these tests use different mechanisms (Objective-C retain versus
C++ copy constructor) as proxies to observe if the block was copied, we
should keep both of them.

Commit, that first avoided the unnecessary copy:
faef7d034a9ec6cb757137adce8e8670ec6c2d7b

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D60639

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