Made MagGeometry thread safe

Changed MagGeometry to use an std::atomic<> for its cache of the last volume used. This will allow thread-safe comparisions.
Changed const member functions to return const pointers to member data. This is also needed for thread-safety and was
caught by the static analyzer.
Also changed member data which were pointers to be const pointers in order to help  make future maintanence thread-safe.