Make event_break threadsafe; make notify-thread mechanism a little more generic; let it use pipes where they work. svn:r1019