Lock cache of TClassRef

Make sure to lock access to the TClassRef cache to avoid a data
race.
Protect access to IsCompiled

Make sure that IsCompiled is only set once the TStreamerInfo is
actually compiled. Also, make sure to lock and then check the value
again to avoid two threads from recompiling the same object.
Merge pull request #40 from Dr15Jones/anotherRoundOfThreadSafetyFixes

Another round of thread safety fixes