fix usage of couchdb tasks iterator
fix usage of couchdb tasks iterator

Change-Id: Ia9b23d52b8a57e2f166928189a77f36a94663837
Reviewed-on: http://review.couchbase.org/25202
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>

vmx/cbagent,couchbase/cbmonitor,mikewied/cbagent,couchbase/cbagent,pavel-paulau/cbagent,couchbase/cbmonitor