This skips calling pthread_self when main_thread_identity hasn't
been initialized yet. main_thread_identity is only ever assigned in
__tsan::InitializePlatform. This change should be relatively safe; we
are not changing behavior other than skipping the call to pthread_self
when main_thread_identity == 0.
rdar://57822138