[tor-commits] [tor/master] Isolate the "socketpair or a pipe" logic for alerting main thread