rbuf: adapt to work on ccan/membuf.