Add stream end logic for upr consumer

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