scripted-diff: rename m_cs_callbacks_pending -> m_callbacks_mutex
refactor: replace RecursiveMutex m_callbacks_mutex with Mutex
In each of the critical sections, only the the guarded variables are
accessed, without any chance that within one section another one is
called. Hence, we can use an ordinary Mutex instead of RecursiveMutex.
This is a backport of core#24069