Changed the value access function for CTDictionary to be in line with the CTArray version.
Added mutexes to prevent use of the default allocator by multiple threads at once.