Only check for replica if there really is one used.

This changeset changes the behavior on how the code
makes sure that there are enough replicas available
in a way so that even if there is only a PersistTo
constraint applied and no ReplicateTo, it will not
fail with an IndexOutOfBound exception. If this is
the case, then it is simply ignore and only the
PersistTo logic is applied.

Change-Id: Ibcfbe13cf0ee1ef791e6c3202723074b05d32833
Reviewed-on: http://review.couchbase.org/24935
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>