[ASan] Fix GCD tests by spinning forever in the main thread.
Since the error is always reported by one of the GCD workers, this will help avoid premature program termination with exit code 0.