CCBC-282: Make server buffers reentrant-safe

When purging implicit commands, we invoke callbacks which may in turn
cause other LCB entry points to be invoked which can shift the contents
and/or positions of the ringbuffers we're reading from. This patch is an
attempt at making an (efficient) copy of the necessary data so that we
can safely invoke callbacks without worrying about reentrancy issues.

Change-Id: Id844fbe5c237ec5851cfb4f62ed47f7a0f2c159d
Reviewed-on: http://review.couchbase.org/29608
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-279: lcb_wait() should always return success

Change-Id: I7d09a982c8a17efffcb618dc2e9704bb287ad5f1
Reviewed-on: http://review.couchbase.org/29458
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>