Rewrite CircularBuffer to be more compliant with std::queue.
Add simple test for CicularBuffer.