Add Buffer class to store data and track its size

Buffer has a char array and a counter that is incremented every time
data is appened to the buffer.