Mostly implement tree_append3 and tree_append4

Node iterator pair versions skipped for now.
Partly implement tree_mutable_iters.

With this, that's as far as I see the need to go implementing
tree_runner.cpp for now.  Everything seems to work quite well!
Tidy up the main tree and interface files into a common order.