MB-6454: compare_rep_history returns incorrect value
MB-6454: compare_rep_history returns incorrect value

The incorrect value returned will crash vbucket replicator and even
make rebalance-in fail at source cluster. This change-set will fix
this issue.

Change-Id: Icc7cb516a6bee47aea02f685f8b27de98f92a550
Reviewed-on: http://review.couchbase.org/20277
Tested-by: Junyi Xie <cec9b1c9f34a8d92cba938f3f3364d5120580782@gmail.com>
Reviewed-by: Junyi Xie <cec9b1c9f34a8d92cba938f3f3364d5120580782@gmail.com>

vzasade/ns_server,ceejatec/ns_server,membase/ns_server,ceejatec/ns_server,membase/ns_server,membase/ns_server,ceejatec/ns_server,pavel-blagodov/ns_server,t3rm1n4l/ns_server,mschoch/ns_server,pavel-blagodov/ns_server,daverigby/ns_server,nimishzynga/ns_server,vzasade/ns_server,ceejatec/ns_server,pavel-blagodov/ns_server,mschoch/ns_server,nimishzynga/ns_server,ceejatec/ns_server,nimishzynga/ns_server,mschoch/ns_server,t3rm1n4l/ns_server,daverigby/ns_server,daverigby/ns_server,t3rm1n4l/ns_server,vzasade/ns_server,mschoch/ns_server,vzasade/ns_server,ceejatec/ns_server,membase/ns_server,t3rm1n4l/ns_server,pavel-blagodov/ns_server,daverigby/ns_server,mschoch/ns_server,daverigby/ns_server,membase/ns_server,t3rm1n4l/ns_server,mschoch/ns_server,nimishzynga/ns_server,membase/ns_server,nimishzynga/ns_server,nimishzynga/ns_server