TBR: v.io/jiri: fix a race condition in runtile/sequence.go

Share a lock across all writers passed to Capture regardless
of if they are the same or not. This handles cases of the form

var out bytes.Buffer
stdout := io.MultiWriter(&out, jirix.Stdout())
stderr := io.MultiWriter(&out, jirix.Stdout())
s.Capture(stdout, stderr).Run....

where the same underlying output stream is aliased via
a wrapper.

Change-Id: Idbe010b14de992a30c35793e6c562ce26f3406a8
2 files changed