Thread safety fix for MagneticField/Engine:  Member data modified in const function

use of atomic to avoid 
  - Member data modified in const function

Static analyzer will still report it as mutable member are still needed.