ropes: Fix the behavior of `RopeBuffer.clear` when used with `to_s`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
ropes: Fix `RopeBuffer.reset`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>