Tree control tweaks

I've been using the tree control with some *big* outlines (~5000 entries), and have shaken out a few nits:

* I made it about 30% faster for expand/collapse (simply by iterating over the LIs instead of over the spans)

* I added openall and closeall support

* I'm adding support for noticing if a server-side process has already kind put in all the spanA/spanB/spanC structure, and skip initTrees if so (doing this server-side saves about 20 seconds for the user in big cases).

I've also fixed what I think of as a bug, namely that when you click on a title, in addition to following the link, it also toggles the expansion there as if you'd clicked on the +/-.

I've also added internal documentation, since it took me a while to figure out some of the details of how it's doing what it does.