run-tests: replace popen locking with a noop _cleanup handler on py24
This also avoids the race condition, and isn't detrimental to job scheduling.
run-tests: only lock Popen wait/poll on python 2.4
It can cause scheduling bubbles and is not necessary on newer pythons.
run-tests: lock popen wait/poll
In python2.4, any call to Popen() may attempt to wait on any active
process, and wait is not thread-safe. Make it thread-safe.
See http://bugs.python.org/
issue1731717 for details.