get memory barriers right

Any change to and read from wpos/rpos is now done atomically.
Keep in mind that `mp_atomic_add_and_fetch` also implies a full memory barrier.