Fix #14048 - Change the locking in XBPython/XBPyThread

Separate locks for the different lists managed by XBPython so that they don't interfere with each other. Closes #14048