Keep track of threads during late exit after dcontext and thread record have been destroyed. Use exit record to recognize a late takeover signal received when no dcontext is available anymore and avoid a deadlock that can happen if a thread is holding a vm_area lock while freeing its dstack and the signal arriving during write_lock or write_unlock, leaving the lock in an undefined state.
Fixes #2694