common/rbuf: Handle ring buffer wrapping

Handle when the ring buffer wraps for reads and writes.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
common: Add write commit capability to ring buffer

The ring buffer requires that all data to be added
to a ring buffer be written with a single call.  As soon as
the data is written, a reader may extract it.  This behavior
can result in a caller needing to stage its data into a
temporary buffer until the write can be issued.

Instead, allow multiple writes to occur to the ring buffer
with a commit call being used to indicate that the newly
inserted data is now safe for reading.  This avoids the need
to use a temporary buffer, with the ring buffer updated directly.

Add an abort call for good measure.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
common: Add const to ringbuf write calls

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
prov/sockets: Implement transmit context

A transmit context is an abstraction over a ring buffer, with
the ability to wait on an fd if the ring buffer is empty, until
an item is inserted into it.

Items are inserted into the transmit context when a data transfer
is initiated by the application.  The progress engine pulls
operations from the transmit context for processing.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>