Thread.Queue [Paranoia]: Attempt to work around glibc bugs.
Glibc 2.24 and earlier have a broken implementation of condition
variables (cf https://sourceware.org/bugzilla/show_bug.cgi?id=13165).
Attempt to work around the issue by having the signalling thread
release the associated mutex before signalling.
Potential fix for [Pike-140].
Thread.Queue [Paranoia]: Broadcast the changed state.
This is intended to ensure that the state-changed signal
is not lost.
Consider the case when there is a thread that listens on the
condition, but does not act on it; it could starve the threads
that do intend to act on it.