MB-7198: fix XDCR checkpoint timer issue

Today we start timer each time the vb replication starts or wakes up
from sleeping. However, we do not cancel the old timer when creating
a new one. This caused accumulated timer over time per vb replicator
and thus flood the vb replicator with more checkpoint msgs than
expected.

This fix cancels the timer when vb replicator is done or terminates,
and it also cancels old timer if exists, before creating a new one.

Change-Id: Ied66c5c4b4449afdefc55fb9e235d51659fd951e
Reviewed-on: http://review.couchbase.org/22581
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
Tested-by: Ketaki Gangal <ketakigangal@gmail.com>
MB-7220: Retrieve datbase_dir from ini file

db_dir is no longer persisted in config.dat file since 2.0

Change-Id: I8a88f7826572b0010d7fc1db2183c0894c5ff0b8
Reviewed-on: http://review.couchbase.org/22660
Tested-by: Bin Cui <bin.cui@gmail.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>
MB-7200: Capture ddocs/views from all buckets

Change-Id: I0397227a57096e0f371bef26c20947e6473a64fb
Reviewed-on: http://review.couchbase.org/22661
Tested-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>
MB-7197: decrease number of scheduler threads to 16

Because more schedulers does not help, but make idle system overhead
too big.

Change-Id: Ic476ee4897afa0fa03f1d0421171463e45fe4273
Reviewed-on: http://review.couchbase.org/22690
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Farshid Ghods <farshid@couchbase.com>
Tested-by: Farshid Ghods <farshid@couchbase.com>
MB-7219: Expose XDCR tuning parameters as interal settings

Currently, the XDCR tuning settings (concurrent replications,
checkpoint interval, worker batch size and count, failure
restart interval) are not accessible via REST API. This
commit adds them into the /internalSettings REST call and
for consistency, adds them to the interal settings UI.

Change-Id: If39a1f0da30a2089b2cec54c07206d6063a06fc2
Reviewed-on: http://review.couchbase.org/22684
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Revert "MB-7124: Don't capitalize doc id in view sample document window"

This reverts commit 6bc64a6643619ab43672f7314519a1ea99e996dc.

Change-Id: I6b0edf970b9f3ea1d09b9f3c85f531d7a80b8f30
Reviewed-on: http://review.couchbase.org/22693
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
MB-7223: MB-7124: correctly fix sample document id capitalization

Some time ago unfortunately some css classes were reused in some new
parts of 2.0 essentially encouranging regression seen in
MB-7223.

Basically if in one place you want capitalization and another you
dont, you can 'fix' capitalization by changing CSS rule in one place
simultaneously braking it in other. That's because CSS classes are not
semantical and have unpredictable effects on unpredictable places.

So right fix of MB-7124 is to do it in a way that we started doing
once we realized scope of CSS mess we're in. We're mostly using inline
styles now.

Change-Id: I267a7698a499e35b96dd49e3672f4cbf60d9d66e
Reviewed-on: http://review.couchbase.org/22694
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
wip: limit both in- and out- going vbucket moves

I need this for view compactor runs

Change-Id: Ia4cd6b39e1f70ad5de52edbe43f0136e90f25180
wip: run view compaction explicitly as part of vbucket moves

WIP.

We continue blissfully ignoring replica indexes. And we still lack
some configuration settings.

Change-Id: Icfc1c4c8b73446122c8a44e112db6fe59218c7b8
mark

Change-Id: If43c35b840eefaf003c3c833202841074d9b4e38
mark

Change-Id: I4f7b8af494b9eedeaad7669f1fa4f5fbb77fd2a7
mark

Change-Id: Ie8def13332b16efc138f12ff8a967d2a7ec624c8
mark

Change-Id: I89ff10a9e48cbe3c15018d858c0d4badea9c4650
mark

Change-Id: I6e1d169f418cd2d4314f4c78307b173cfeeffaff
mark

Change-Id: I1530163cd8eb1350cae2e9a76bedb4df5b1e646b
mark

Change-Id: I57e8ddfbd6e7ef8411801ec741340459f6f1d588
mark

Change-Id: I14b4f459f8b7cd33cb9970717286f7e6fbb8a2d8
mark

Change-Id: Id8b9643758f8d5eec84548a4e4713e2cbad690bf
mark

Change-Id: I4c99851bed8960989f5338c15886ed177909f26b
mark

Change-Id: I22ae5c2eab01fba480f2e0af6fd7f478bd2d21a1