An api to use circular buffers.
Source: http://en.wikipedia.org/wiki/Circular_buffer#Always_Keep_One_Slot_Open.