ropes: Fix a bug in `RopeBuffer.clear`

… and clean `RopeBuffer` a little bit.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>