Add mutexes for thread safe use of TBaseClass
Add comments about mutex needed for TypeBases and BaseWithDict
Merge pull request #4092 from wmtan/ThreadSafeUseOfTBaseClass

Add mutexes for thread safe use of TBaseClass