Thread safe changes
Add addValidID method; remove m_sortedIds
Change m_validIds.push_back call to addValidID
Change push_back/sort to lower_bound/insert
Added memory order hooks
Wrap atomic into if/else to keep ROOT build happy
Merge pull request #965 from vkuznet/ThreadSafe_CaloGeometry

Thread safety fixes -- Thread safe changes for CaloGeometry and dependent packages