Read and update uint32_t shared ring counters atomically

Unfortunately cstruct -> ocplib-endian -> ocaml builtins
perform single byte loads and stores. We rely on single
atomic loads and stores separated by memory barriers.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>