(1) Advance to the next buffer when filling the iovec array rather than
endlessly cycling over the first one.
(2) Only clear MSG_MORE if we have sent all the buffered data at the end of
the transmission phase of a call.
(3) Don't turn the return value of sendmsg() into just -1 or 0 as we need the
number of bytes actually sent to allow us to correctly advance the buffer
cursor.
Signed-off-by: David Howells <dhowells@redhat.com>