[OpenACC][CIR] Implement atomic-write lowering (#164627)
This is a slightly more complicated variant of this, which supports 'x =
expr', so the right hand side is an r-value. This patch implements that,
adds some tests, and does some minor refactoring to the infrastructure
added for the 'atomic read' to make it more flexible for 'write'.
This is the second of four 'atomic' kinds.