MB-10514: Wait for the backfill queue to drain before scheduling backfill

It is possible that after a vbucket takeover the entire backfill
queue has not drained. This means that if we schedule a backfill
may miss some items. This change causes the backfill task to wait
until all of the backfill items have been persisted before
scheduling the a new backfill.

Change-Id: I158f49aac40a932fd45431666e134e842df8ba92
Reviewed-on: http://review.couchbase.org/36255
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>