MB-7837: continuously tunable optimistic XDCR

This commit introduces "xdcr_optimistic_replication_threshold",
which is 256 bytes by default. This paraemter is used by XDCR to
split docs list into two: a list of big docs, whose docs are all
bigger than the threshold parameter,  and a list of small docs
whose docs are no greater than it. For small docs, we skip all
revs_diff operations and optimistically send them directly to the
remote cluster. For big docs, we still send revs_diff first and
then only send those docs surviving conflict resolution at remote
node.

By this way, users are able to continuously adjust the parameter
to determine which docs should be replicated optimistically.

The deletion, however, is always treated as small doc, regardless
of its doc size, because there is no benefit to send revs_diff for
deletions at all.

The corresponding environment parameter is:

"XDCR_OPTIMISTIC_REPLICATION_THRESHOLD"

and users can always override the ns_server parameter using the env
parameter.

The ns_server parameter "xdcr_optimistic_replication" and its env
parameters will both retire with this commit since the optimistic
replication is naturally encoded in the new parameter, which can
be set to a big number to cover all docs.

Change-Id: I739b2c63cce64e31b18387938acf1c844f023cc6
Reviewed-on: http://review.couchbase.org/24934
Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
Reviewed-by: Damien Katz <damien@couchbase.com>