introduced rbuf_copy(), rbuf_move(), rbuf_used(), rbuf_available()

+ renamed rbuf_len() has been deprecated in favour of rbuf_used()
+ minor optimizations