Backend tree conversion

Port of `diagrams-cairo` to use the new `RTree` interface.  All tests now pass.  I considered cleaning this up by squashing into just a few commits, but all the bugs I encountered are quite instructive (as, I hope, are the detailed commit messages).