Fix _handle_write() may not send full frame

If socket.send() in _handle_write() does not send all of
the bytes requested, put the remainder of the frame back
on the outbound buffer.