set_main_thread() not called on second initialization with pthreads
The windows thread initialization function calls set_main_thread unconditionally, but the pthreads thread initialization function only calls it the first time we're initializing Tor. That can lead to trouble with embedding.