Made RunTimeTyped::baseTypeIds and derivedTypeIds thread safe

Previously they were reading/writing to global maps without a mutex, which was causing problems in IECoreGL...
Merge pull request #185 from davidsminor/runTimeTypedTypeIdsThreadSafety

Made RunTimeTyped::baseTypeIds and derivedTypeIds thread safe