Update minimum GCC version
Replace BOOST_FOREACH with range-based for loops
Use C++11 atomics for the ThinMutex and Object classes