repo: add some helpers akin to subprocess.run
repo: add some helpers akin to subprocess.run

We can't rely on subprocess.run yet as that requires Python 3.6,
but we can clean up the code we have with some ad-hoc replacement.
This unifies all the inconsistent subprocess.Popen usage we have.

Change-Id: I56af40a3df988ee47b299105d692ff419d07ad6b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254754
Reviewed-by: David Pursehouse <e7b5c6a4a3dbaca972851f8c075e19915752593f@collab.net>
Tested-by: Mike Frysinger <8f3f75c74bd5184edcfa6534cab3c13a00a2f794@google.com>

codetutil/git-repo,mer-tools/git-repo,lipro-yocto/git-repo,aosp-mirror/tools_repo,couchbasedeps/git-repo,aosp-mirror/tools_repo,couchbasedeps/git-repo,GerritCodeReview/git-repo,TheQtCompany/git-repo,GerritCodeReview/git-repo,lipro-yocto/git-repo,codetutil/git-repo,TheQtCompany/git-repo,mer-tools/git-repo,lewixliu/git-repo,lewixliu/git-repo