Implement new ring buffer class template.

* Remove some unused dead-end code.
* Add a new `RingBuffer2D` class template with reservation feature -
  regions within the buffer can be *reserved*. With a reservation, it
  is possible to check whether the region has been modified (is dirty)
  since reservation. This new class template is going to be used as
  a buffer for waterfall data.