MB-9939: fix ringbuffer crash with a stable read

Change-Id: I593a7a38623108c357cf8a5295e89fe5fa347b9d
Reviewed-on: http://review.couchbase.org/33153
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>