Add a thread safe mutable dict class

Just now I got like 4 crashes in `objectWithIdentifier:` so I thought it was finally time to make `objectDictionary` thread safe.

This will have performance implications, but my limited testing hasn't shown it to be problematic.
Of course, this is just a poor man's fix for a badly designed multithreading mess, but what can we do?