Custom implementation of BitStack.

I was basing it off of std::bitset before, but that has some overhead
that can be avoided in the specific case of treating a set of bits
as a stack.  Got a nice performance boost, as apparently the BitStack
operations actually take up a non-trivial amount of time during BVH2/4
traversal.