split withstat_py test to make the compatible part run in Py26

--HG--
rename : tests/run/withstat_py.py => tests/run/withstat_py27.py
add context manager test with threading.Lock which previously failed in Py2.6 (by Wouter Bolsterlee)