Fix sporadic unit test failure in upr end stream test

Because we now se flow control the actual end stream reasponse is
processed by another thread. As a result it is possible that the
other thread hasn't processed this item when we check the stats. As
a result we need to wait until the stat changes.

Change-Id: Icdb71d61e5842da462b9668321f444a6868bee05
Reviewed-on: http://review.couchbase.org/37015
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>