Added AtomicCachePtr class

The AtomicCachePtr is designed own a pointer to a cache and set and access that cache in a thread safe manner.
Merge pull request #1362 from Dr15Jones/atomicPtrCache

Multithreading fixes -- Added AtomicCachePtr class