Enable multi-writer support underlying ring buf.

This patch adds APIs to support multi-writer ring
buffers. This only affects ring.h, and does not
change how pgm ring-based edges use ring buffers.