fix(subinterpreter): serialize interpreter creation on Python 3.13 (#6266)

Concurrent Py_NewInterpreterFromConfig() calls can fail on Python 3.13,
which is the cause of the "Per-Subinterpreter GIL" CI flake in #6071.
The mutex that prevents this was active only for Python 3.12.

Interpreter initialization in 3.13 takes the main GIL, so the mutex
cannot be taken while the thread holds a GIL. Take it before the main
GIL, and release the GIL of the caller during the wait.

Assisted-by: ClaudeCode:claude-fable-5-2
2 files changed