MB-10400: commented out "behind purger check"

which we cannot yet do in upr world

Change-Id: Iab4a041e5d0c98e619b7339ffeee37fa370ca4a2
Reviewed-on: http://review.couchbase.org/34809
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-10400: use better api for opening src master vbucket

Change-Id: I93ce7bab82c53b56cbc4ea5c0606a9c2fe370b60
Reviewed-on: http://review.couchbase.org/34810
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-10400: removed duplication in queue_fetch_loop

Change-Id: I930e163f8d5b39d4f1e327b22ead24425cdb036b
Reviewed-on: http://review.couchbase.org/34811
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-10400: dropped use tgt_master_db

Because it's not used

Change-Id: If8dea776326765bf24c37964566668808b97cd25
Reviewed-on: http://review.couchbase.org/34812
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-10400: added xdcr_upr_sockets_pool

Change-Id: Ifcd228367684970b15150200cc83ff3451ff3079
Reviewed-on: http://review.couchbase.org/34813
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-10400: added xdcr_upr_streamer

This is initial implemenation of performance-oriented upr client for
xdcr. There are plenty of code that will change when upr server
actually supports flow control. And there are plenty of debugging
stuff that I'm leaving in for now, until implementation is finalized.

Change-Id: I8460ebe1dda9ae7f895a1b2479eed1a178d90113
Reviewed-on: http://review.couchbase.org/34814
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-10400: initial xdcr-over-upr implementation

Note that I've decided to keep old xdcr path alive for some
time. Particularly bacause make simple-test is failing. And because
upr implementation has some known bugs (like upr stream getting stuck).

There's ns_config switch which value is picked based on environment
variable. If XDCR_USE_NEW_PATH environment variable is set, then new,
upr-based code path is selected. Otherwise old path is picked.

Note that xdc_vbucket_rep_worker for old path was merely copied from
prior revision of this file. There is no attempt to keep shared code
shared in this place of code. That is because old path is expected to
die reasonably soon. And to make killing it easier.

This commit implements both upr-based mutations consumption as well as
upr-based checkpointing.

Remote end of upr-based xdcr is using seqno + vbucket uuid in order to
represent commitopaque. And vbucket uuid is used as vbopaque.

Local end is saving seqno, last snapshot seqno and (local) vbucket
uuid to represent it "consumer coordinates". On resumption, those
local coordinates are used to establish upr stream. And upr rollback
is used to handle partial or full data loss. I.e. there is no notion
of "checking local end of checkpoint for validness" because local end
is always valid. UPR handles proper resumption for us.

Change-Id: I07ddba2f53eb88b3bc182040ac897f677bfb36b2
Reviewed-on: http://review.couchbase.org/34815
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>