gh-150902: Optimize PyCriticalSection2 to skip locking the same locks as the ones held by the current CS2
#265007
| Job | Run time |
|---|---|
| 6s | |
| 5s | |
| 11s |