use atomics in the write barrier slow path (#52463)
Use atomics in the write-barrier slow-path to prevent duplicates in the
remset.
As discussed in https://github.com/JuliaLang/julia/issues/50419, setting
the mark bit is idempotent, but updating page metadata in the mark phase
is not.