Extract rose-tree code into a separate namespace

Also removed "-rose" and "rose-" from the function names, since
they'll be referenced externally as rose/foo.