Implement a simple tree structure without using anytree
anytree isn't currently available in Debian or Ubuntu, and seems like a lot of code just to get a tree data structure. Reimplement just the bits we need, with a compatible API.
This won't be viable if gtk-doc starts needing more of the anytree API, but a dependency on a 188K third-party project seems excessive for the 50 lines of code we need.