MB-10304 upr client: code cleanup

Moved duplicate code paths into better modular methods

Change-Id: I117e128a785cf1be65bc38450769293e04d4f9d0
Reviewed-on: http://review.couchbase.org/34120
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Volker Mische <volker.mische@gmail.com>