thread cannot be used for lsan or msan on Android, because its emutls implementation relies on functions that will be intercepted. This revision replaces thread with a struct stored in TLS_SLOT_TSAN.
msan requires corresponding changes (D22550) to LLVM MemorySanitizer.cpp.