Subinterpreter creation concurrency issues in 3.12  (#5779)

* Seems like 3.12 has concurrency issues when creating a subinterpreter, easiest workaround is just to lock during it.

* Only need this for PER_INTERPRETER_GIL
1 file changed