Finished c++ -> ruby conversion of BitStream, fixes to GrowingBuffer, and some cleanup