thread: Don't acquire lock for thread_cleanup_push/pop