Simple and portable circular buffer library.