tsan: consistently use thr instead of cur_thread() in annotations implementation