add atomic operators for globals, memory, and setonce (#52868)
This implements `AtomicMemory`, atomic operations for globals, and the
class of atomic function for setting a field or global or memory exactly
once (setting undef => value). It is quite similar to an
`@atomicreplace`, but where there was not a previous value. This is not
needed for pointers, since it is simply calling C_NULL => pointer in
that case, since there is no "undef" value that throws after load.
plenty of future work still, for a later PR:
- syntax lowering for `@atomic global x = y` and `@atomic closedover =
y`
- adding `Core.AtomicBox` for closure capture
- generic functions for `atomicsetindex` & friends
- macro for `@atomic x = y` and `@atomic x[] = y`, etc
- design for `@atomiconce f()`