Tree: Massive speedup in Tree#emptyNode().

Previously, `emptyNode()` triggered a node map reindex for each node
that was removed. This commit modifies `emptyNode()` to remove nodes in
last-first order and avoids the need to reindex.

Previously, emptying a node with 10,000 children took about 17 seconds
in Chrome. After this change, it's nearly instantaneous.
Build tree.