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.
[ original upstream message ]
run-tests: only lock Popen wait/poll on python 2.4
It can cause scheduling bubbles and is not necessary on newer pythons.
[ original upstream message ]