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

Thread safe use of t base class