fixed dialyzer warning

It looks like lhttpc:request defines error case as {error,
atom()}. While we know that in case of ssl issues it may return
{error, {{tls_error, _}, _}}. Instead of fixing lhttpc I decided to
trick dialyzer with use of nif_error.

Change-Id: Ib8065fec46faacf16828011e28a44271b793993b
Reviewed-on: http://review.couchbase.org/40270
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-11873: made remote bucket info invalidation work

invalidate_remote_bucket_by_ref/1 was broken due to conflation of
cluster name and uuid. Now it's fixed.

Change-Id: If60495d12b2ae12d057ebfd947e02a6a99223144
Reviewed-on: http://review.couchbase.org/40271
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-11873: fixed logging old_node_marker vbopaque

xdcr trace infrastructure needs it to be ejson. And old marker wasn't.

I've also updated few places where vbopaque was logged with assumption
that it's string.

Change-Id: I1d8cbcb8e709884f135b45c7b01345adb691498c
Reviewed-on: http://review.couchbase.org/40272
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
added xdcrCheckpointing and nodesExt to bucket caps

Change-Id: Ibdb1a898db4f11e2242433d7365d92fae83a3f53
Reviewed-on: http://review.couchbase.org/40273
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-11873: use bucket caps to avoid assuming old nodes on any 404

Part of the problem observed in MB-11873 was silent assumption that
any 404 signals replication into remote node. This assumption could
lead to tiny race where checkpointing is disabled due to brief 404
from new node (i.e. not_my_vbucket condition that disappears after
pre_replicate but before actual mutations are sent).

Change-Id: I2135b4c021a3c40749ab34222567a06971f30799
Reviewed-on: http://review.couchbase.org/40274
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Revert "MB-11873: Revert "fixed remote_clusters_info... gc-ing""

This reverts commit 85c22e404bf70bb36baadcedecedbb6cb61dda36.

This revers the revert of commit:
f7fe5469015fdd19fc58cf70f896d922a45daa0d

After true MB-11873 fixes we can now return fix for
remote_clusters_info gc-ing.

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