Allocate ring buffers on the heap

We need versions of `cork_ring_buffer_new()` and `cork_ring_buffer_free()`.