Only apply /proc technique for detecting terminated thread to external threads.
Fixed bug #477 "PTLIB crashes on startup when there is a window with long text"
Fixed bug #476 "PTLIB terminates completed threads (svn trunk)"
Work around for bizarre problem with some USB headsets, they lock up in sound driver, causing a cascade of deadlocks. Put a timeout on the "wait for free buffer" as this should never take that long. This will likely not fix the actual problem, but means that it is less catastrophic when it happens.