Fix a deadlock related to event-base notification. Diagnosed by Zhou Li, Avi Bab, and Scott Lamb. The problem was that the thread doing the notification could block on write in evthread_notify_base_default while holding the th_base_lock. The main thread would never drain th_notify_fd[0], since it would need th_base_lock to actually trigger events.