Implement writer interface for ringbuf_t
Add ringbuf_t tests for writer_t interface