Generalize implementation & add some Rope#[]= support

Hello, 

I have a use case for a Rope with a data type other than String. This PR includes changes generalize Rope into BasicRope, a class that can be extended to support any data type with methods length, slice, etc. It also adds partial support for []=, mimicking the behavior of the equivalent function on String. 

Please let me know if you're interested in merging these changes. If you prefer, I can break this up into two PRs: one for the generalization, another for []=. Thanks!