[hwasan] Tweak process and thread initialization.

Make sure that TLS_SLOT_TSAN is always available and correctly set up in
HWASan-instrumented functions by setting up the tls register and running hwasan
initialization (__hwasan_init in the main thread and __hwasan_thread_enter in
secondary) early enough.

This is needed to accomodate a change in HWASan: https://reviews.llvm.org/D52249

Bug: 112438058
Test: boot with SANITIZE_TARGET=hwaddress, run bionic-tests
Change-Id: Icd909a4ea0da6c6c1095522bcc28debef5f2c63d
diff --git a/libc/bionic/pthread_internal.h b/libc/bionic/pthread_internal.h
index 1ec201b..65ec5ff 100644
--- a/libc/bionic/pthread_internal.h
+++ b/libc/bionic/pthread_internal.h
@@ -151,6 +151,9 @@
   return *__get_thread()->bionic_tls;
 }
 
+extern __LIBC_HIDDEN__ pthread_internal_t* __get_main_thread();
+extern "C" __LIBC_HIDDEN__ int __set_tls(void* ptr);
+
 __LIBC_HIDDEN__ void pthread_key_clean_all(void);
 
 // Address space is precious on LP32, so use the minimum unit: one page.