Made staic debug controls std::atomics

To avoid race conditions when changing the debug conditions, switched
all the variables to be std::atomics following similar code use in
other classes of this package.
These statics were found by the static analyzer.