Added Locks. Added C++11 compiler check to determine if we should use the built-in thread and mutexes.
Add ReadWriteLock and ReentrantLock