CBQE-1705:  replace changes that failed to merge from gerrit:

  http://review.couchbase.org/#/c/31574
  http://review.couchbase.org/#/c/31577

Change-Id: I90fd61cddc962a75b4a48138b09e87db1be9111d
Reviewed-on: http://review.couchbase.org/31631
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Philip Labee <philip@couchbase.com>