Add RingBuffer

Basic ring buffer. We can add more functionality as needed later.
Not thread safe, perhaps add read/write lock later, but this should
be specified in constructor in that case.
Merge pull request #1204 from sigurdteigen/master

Add RingBuffer