[threads] Ensure we have balanced appdomain push/pop when attaching the thread on...