test_asyncore: wait explicitly for a thread termination (this dangling thread
could be the cause of a random failure).
Issue #16922: fixed findtext() to return empty Unicode string instead of empty bytes object when there's no text.

Patch by Serhiy Storchaka.