MB-4828 Check backfill completion in TapProducer::nextFgFetched()
MB-4828 Check backfill completion in TapProducer::nextFgFetched()

As backfill is performed by the separate dispatcher thread and
replication/takeover is performed by the memcached tap thread,
the tap thread should check the backfill completion before
poping the next item from the queue.

Change-Id: Ifff228a2e152f0472b1eb9c5bdbf0e14e5d76691
Reviewed-on: http://review.couchbase.org/13562
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
Tested-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>

daverigby/kv_engine,owendCB/ep-engine,hisundar/ep-engine,couchbaselabs/ep-engine,couchbaselabs/ep-engine,couchbase/ep-engine,daverigby/ep-engine,daverigby/ep-engine,jimwwalker/ep-engine,abhinavdangeti/ep-engine,hisundar/ep-engine,abhinavdangeti/ep-engine,daverigby/ep-engine,teligent-ru/ep-engine,membase/ep-engine,sriganes/ep-engine,daverigby/kv_engine,jimwwalker/ep-engine,sriganes/ep-engine,teligent-ru/ep-engine,abhinavdangeti/ep-engine,couchbase/ep-engine,membase/ep-engine,daverigby/kv_engine,teligent-ru/ep-engine,couchbaselabs/ep-engine,couchbaselabs/ep-engine,abhinavdangeti/ep-engine,sriganes/ep-engine,owendCB/ep-engine,owendCB/ep-engine,couchbase/ep-engine,jimwwalker/ep-engine,couchbaselabs/ep-engine,membase/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,daverigby/kv_engine,jimwwalker/ep-engine,membase/ep-engine,hisundar/ep-engine,abhinavdangeti/ep-engine,owendCB/ep-engine,sriganes/ep-engine,hisundar/ep-engine,daverigby/ep-engine