tsan: handle early signals
The second part of the fix of
https://code.google.com/p/thread-sanitizer/issues/detail?id=71