Modernize some Python subprocess calls.
subprocess.run() is now the recommended high-level interface for the
subprocess module. It trivially replaces subprocess.check_output and
usually simplifies subprocess.Popen use cases. It has less error prone
semantics for str vs. bytes I/O. subprocess.run() is less prone to
PIPE buffer deadlocks and we should use the modern interface in order to
benefit from future improvements, as well.
A handful of more intricate subprocess.Popen() usages are left, but I
think we can say that, along with
d80618cb, this change
Fixes #3154
Change-Id: I88f4eaabd8504d3800692c9617571103b2528cf9