handle data-race on nrunning==0 from scheduler_delete_thread
Could be observed by thread 0 during certain phases, since if the dying
thread was not running, it was not supposed to call jl_wakeup_thread
(which will not increment nrunning until after the wakeup).