MB-8530 Set TAP paused flag upon returning TAP_PAUSE response.

We should set the TAP paused flag to true only if there are no
items to be sent to the destination. Otherwise, we invoke
too many unnecessary notify_io_complete calls.

Change-Id: Icc1da864b4202406ff84f29172ade09fe395cce4
Reviewed-on: http://review.couchbase.org/28424
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-8890 Fix to the incorrect check for deleted/non-existent items

Change-Id: I3669419ba83b6624e58d9feebc0f695ca6212824
Reviewed-on: http://review.couchbase.org/28428
Reviewed-by: Sundararaman Sridharan <sundar.sridharan@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>