bpo-39947: Use _PyInterpreterState_GET_UNSAFE() (GH-18978)

Replace _PyInterpreterState_Get() function call with
_PyInterpreterState_GET_UNSAFE() macro which is more efficient but
don't check if tstate or interp is NULL.

_Py_GetConfigsAsDict() now uses _PyThreadState_GET().
9 files changed