This patch adds a face iterator to iterate over all faces in a node. For
this, faces need to be stored in leaf nodes when building the tree.
This iterator can be used to multithread Face Sets operations that need
to loop over all nodes (I implemented invert here as an example even it
is not a critical point for performance), but it will be used to
optimize undo and write faster box/lasso hide operations. It will also
simplify adding multires compatibility as the loop will only need to be
implemented once in the macro.
For building the tree I added an array to keep track if a face was added
to a leaf node to avoid adding faces witch a triangle on different nodes
to two nodes at the same time. I'm not sure how this will affect
multithreading the PBVH in the future.