Simplify BitVector code

Instead of managing memory by hand, delegate it to std::vector. This makes the
code much simpler, and also avoids repeatedly computing the storage size.

According to valgrind --tool=callgrind, this also slightly decreases the
instruction count, but by a small margin.

Differential Revision: https://reviews.llvm.org/D100387

GitOrigin-RevId: 82f0e3d3ea6bf927e3397b2fb423abbc5821a30f
1 file changed