Adding flow control in couchdb upr client.

Change-Id: Id294aa24625d9b7e53ef4752090a1cb17c9475fe
Reviewed-on: http://review.couchbase.org/35600
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: buildbot <build@couchbase.com>