Add ringbuffer_take_buffer

This is a convenience function to initialize a ringbuffer from an
already-allocated buffer.

Change-Id: I463388ee9867753a6e8b05ffbcebc6d00be5daa4
Reviewed-on: http://review.couchbase.org/26479
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>