For 64-bit MacOS, there is no way to set the %fs base which stops us from using DR's scheme used on other unix platforms. This commit provides initial support to MacOS 64-bit by stealing a TLS slot from the app for DR's TLS base.
- implement is_thread_tls_initialized for MacOS 64-bit
- implement tls_thread_init and tls_thread_free
- set MACOS64 define in cmake script
- add WRITE_TLS_SLOT_IMM etc. for MacOS 64-bit
- add read_thread_register for MacOS 64-bit to get pthread_t base
Issue: #1979