Fix durability for single node clusters
Fix durability for single node clusters

The durability function runs observeOne in goroutines for a mutation's master
node and its replicas. Each goroutine is provided with a channel to report
replication and persistence observations. There is careful handling to
ensure that each call to observeOne always writes one value to each channel.

durability selects on the channels and returns when it has detected the
minimum required number of successful replica and persistence writes.
It returns ErrDurabilityTimeout if not enough successes were detected.
However the condition for returning ErrDurabilityTimeout fails for a
single node on the first result returned since (numServers*2)-1 = 1 it
will always return ErrDurabilityTimeout if persistTo > 0 and it receives
on replicaCh before persistCh.

Since observeOne always writes to both channels the condition can be
adjusted to return ErrDurabilityTimeout only when 2*numServer values
have been received.

Change-Id: I1951a677a2ec8abd2a492c6ec52e7447ceecfadb
Reviewed-on: http://review.couchbase.org/93073
Reviewed-by: Brett Lawson <c8c4369773d7d7226e031f0c4af62e3f38a08510@gmail.com>
Tested-by: Brett Lawson <c8c4369773d7d7226e031f0c4af62e3f38a08510@gmail.com>

brett19/gocb