read: consume up to 'ack_up_to' (not 'ack_up_to' + previous value)

Signed-off-by: David Scott <dave.scott@citrix.com>
write: simplify the logic

We try to write 'min <available space> <data to write>': make this
clear by using 'min'.

Remove the return value from the low-level write function: the only
point of this function is to execute the side-effects, not to tell
us the length of the buffer we passed it (which we obviously already
know)

Signed-off-by: David Scott <dave.scott@citrix.com>
read: read 'min <data available> <bytes before wraparound>'

We always return contiguous chunks of buffer from 'read', so if
the data available wraps around the ring, we return only the first
fragment.

Signed-off-by: David Scott <dave.scott@citrix.com>