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.
It's possible to only guard the `__SYSCALL()` macro, which should not be meaningful to userspace, and leave `__NR_sysriscv` defined.  From the kernel's perspective, `__NR_sysriscv` will default to `sys_ni_syscall()` when `!CONFIG_RV_SYSRISCV_ATOMIC`, thereby obviating the need for a separate stub.

Usually I would be hesitant to expose kernel macros in exported headers, but for better or worse, there are already a handful of `#ifdef CONFIG_*` instances in `include/uapi/`...