DESCRIPTION

JVMCBC-166: Observe needs to take the returned CAS into account.

Motivation
----------
When a document with the same key is already replicated, the code needs
to take the cas value into account to not prematurely report a state
from the old (already replicated) document and instead wait for the
new one.

Modifications
-------------
The code now properly crosschecks the returned cas value and does
two things:

	- if it is the master and the CAS values do not match up,
	  raise an error since the document got modified while
	  we were polling.
	- if not the master, only increment the replicated/persisted
	  counters if the cas values match up to prevent getting the
	  state from stale ids.

Result
------
Correct behaviour during observe polling when older documents
are already in place.

Change-Id: Ife13f52a137121eff9eca63e2c1b0de5625fb676


COMMENTS

author: Natasha Sullivan
date: 2015-03-10 13:48:39.126000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2015-03-10 14:08:23.754000000

Patch Set 1: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2015-03-10 14:10:19.517000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Gerrit Code Review
date: 2015-03-10 14:11:25.475000000

Change has been successfully cherry-picked as 24fdfdf6cbbcd3b8519379b6e1545244cfcc9e90

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