MB-10059 Don't create a new rev_seq for a new item on replica.

Replica vbucket currently ignores rev_seq values of new items
from its active vbucket, but instead generates new rev_seq
values for those new items. This can cause the XDCR to be in
inconsistent state, especially when the rebalance or failover
happens. This change makes sure that the replica vbucket uses
a rev_seq value from its active vbucket for a new item.

Change-Id: I634d0296a610b88ffb5e1b97d20606a01d41dc23
Reviewed-on: http://review.couchbase.org/33501
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
MB-10059 Remove the unnecessary check in getting a rev_seq value

Change-Id: I1757b5b0f8c2d58474faeabeb046e9363df3f346
Reviewed-on: http://review.couchbase.org/33502
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
MB-10059 Set a backfilled QueuedItem's rev_seq from hashtable.

Change-Id: Idfd3eb5a69147c657705232b2c0b6cf0a38ab902
Reviewed-on: http://review.couchbase.org/33503
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
MB-10277 Fix to the memory corruption bug in TOUCH command

If TOUCH command is issued with the same expiration time for
a non-resident item, it causes the segmentation fault due to
the NULL pointer to an Item instance.
This change makes sure that we create an Item instance in the
above case because we still need to send the item's metadata
to the client.

Change-Id: Ic1efe24add1f0a3d2da2804c106b61c26bb275fc
Reviewed-on: http://review.couchbase.org/33848
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Merge remote-tracking branch 'couchbase/2.5.0'

Conflicts:
	src/backfill.cc
	src/ep.cc
	src/stored-value.h

Change-Id: Id2dc7912602875b77453ca055ca05831db2128eb