MB-9343 upgrading bucket from tap to upr

- there are 2 types of upgrades: trivial and nontrivial.

- trivial is simply an upgrade of repl_type and is performed for
  buckets which do not have any replications.

- nontrivial is performed sequentially per vbucket after the
  rebalance. for each vbucket it will shutdown tap streams,
  setup upr streams and wait for the data move to happen

- the replication status at the beginning of the upgrade is
  equal to tap. at the end it is equal to upr. in the middle
  of the upgrade it will be set to {upr, RemainingTapPartitions}
  for each upgraded partition thus allowing the restart of
  the upgrade in case if it was stopped or failed

- partitions are upgraded sequentially for each master node.
  partitions for with different master nodes are upgraded in
  parallel

Change-Id: Ibd8bb7c914f7812cbcba0a4504e05d8f083fb137
Reviewed-on: http://review.couchbase.org/33548
Tested-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>