Attempted to implement some book-keeping to make the kd-tree meshing algorithm
a lot faster, and mostly that is good but the book-keeping is not completely
done and it the problem's I've been able to figure out have been very subtle.

I'm going to go through later and try to do less book-keeping on the whole, in
the hope that some of these subtle issues can be entirely avoided.