MB-10877 re-jig provide_batch loop and error checking
MB-10877 re-jig provide_batch loop and error checking

Make sure caller won't ignore any possible socket error and wrongly
return a false status value.

Change-Id: Icf532d41dab2f4d5aa3f7a0f32a00114210e11b0
Reviewed-on: http://review.couchbase.org/35936
Reviewed-by: Jim Walker <1cd02e31b43620d7c664e038ca42a060d61727b9@couchbase.com>
Reviewed-by: Bin Cui <ed18693fff32c00e22495f4877a3b901bed09041@gmail.com>
Tested-by: Bin Cui <ed18693fff32c00e22495f4877a3b901bed09041@gmail.com>

couchbase/couchbase-cli,couchbase/couchbase-cli