MB-11036: Handling race cond. in session_cas impl

- Description in design document
(link available on ticket)

Change-Id: Ic704f962e7637610b3b56c6436bed6676c977090
Reviewed-on: http://review.couchbase.org/37016
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com>
Tested-by: Sundararaman Sridharan <sundar@couchbase.com>