test_asyncore: wait explicitly for a thread termination (this dangling thread
could be the cause of a random failure).