nsCheapSet is used little enough that I didn't bother creating an iterator for
it.
I removed the dependency on PLDHashOperator by introducing nsCheapSetOperator,
which is equivalent.
This is essentially a better fix for bug 894137. Relying on the aNullParent
argument to UnbindFromTree doesn't actually tell us if the dir=auto node
is still in the tree or not. Instead, we can check the parent of the said
node and only reset the direction if the parent exists, which means that
the node is still in the tree.