DESCRIPTION

JCBC-864: Remove with Durability Requirements does not honor CAS

Motivation
----------
It was found that when the remove operation with document and
durability requirements was used, the contained CAS value
was not honored. This meant that potential cas mismatches
were not raised to the user level.

Modifications
-------------
The root cause of the issue was that the document was casted
down to its ID, not passing the cas value down to the core
layer.

The code has been refactored so that both ID- and Document-
based durability requirements now use a common helper method
to avoid code duplication while making sure the CAS value
is honored where possible.

An integration test has been added to avoid future
regressions.

Result
------
Remove with document and durability requirements now
properly respects the CAS value and allows to detect
CAS mismatches on remove.

Change-Id: I917946d3503f49ee6dc309443654479ca22e7bf0
Reviewed-on: http://review.couchbase.org/56209
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Cory Peck xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-on: http://review.couchbase.org/56698


COMMENTS

author: Tate Garrett
date: 2015-11-05 11:04:49.914000000

Change has been successfully cherry-picked as b00c99f1d6e2f2d6bf60bff33e7ff6ee0ef9b94d

-------------------------------------
