Add BitBuffer class to manage bit arrays for valve states. Add support for simple buffer operations, like clear, rotate and invert.