CBQE-2293: backport changes from pyupr

merge from pyupr HEAD:
https://github.com/couchbaselabs/pyupr/commit/f682ef77319446c232337089b4ce5c6720d55b45

highlights: (replace Reader thread with generator func)
https://github.com/couchbaselabs/pyupr/commit/ea652014a4753b384b4d632c6668f457a4210650

Change-Id: I29dd56d2f207937daae9225d4a42b8d1e8173415
Reviewed-on: http://review.couchbase.org/39739
Reviewed-by: Tommie McAfee <tommie@couchbase.com>
Tested-by: Tommie McAfee <tommie@couchbase.com>