Improve atomic memory access and support -mno-atomic.

Use CONFIG_GENERIC_ATOMIC64 if 32-bit.  Add system call to emulate
atomic compare exchange, primarily for targets lacking hardware
support (i.e., lacking RV32A, RV64A).  Support excluding use of
atomic memory instructions (-mno-atomic).

This change is mutually dependent on the corresponding change to
riscv-gcc.
Ensure `access_ok(VERIFY_WRITE, arg1, sizeof(unsigned long))` before calling `__{get,put}_user()`.  I have rewritten `<asm/uaccess.h>` so that this check prevents userspace from accessing kernel memory.

Also, be sure to abort if `err` is non-zero (typically `-EFAULT`).