MB-12249: Use couchdb test run script

Run the etap tests with the couchdb test run script, this should make
them work on Windows as well.

This commit also does a bit of refactoring to be more along the lines
of the couchdb CMake build.

Change-Id: I339ff146a4920db0d59a8eafb02cf910e2dc02a1
Reviewed-on: http://review.couchbase.org/41769
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Volker Mische <volker.mische@gmail.com>