MB-10476: Use cb_assert instead of assert

If compiled with -DNDEBUG assert is an empty macro

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