jiri/runutil: clarify comments on output handing for sequence and add unit test

This change adds a test case to sequence_test to verify the various
combinations of stdout/stderr settings (there are three places where one
can set these for a given sequence, and each one is handled slightly
differently).  Informed by the behavior observed in the test, updated
the comments on the Sequence to more precisely describe where the output
goes.  Also fix the comments around Opts() since Opts also applies only
to the next Run/Last and not all subsequent Run/Lasts (there's even
logic in TestSequenceModifiers to verify this behavior).

Note, this CL doesn't change any actual behavior in the Sequence
package.  However, I think a follow-up CL is due to actually simplify
things: for example, I think allowing Opts to specify stdout and stderr
is unnecessary and only adds complexity.  Vast majority of use cases should
be handled by specifying stdout and stderr just once in NewSequence, and
then using Capture as needed.
Another change that's sensible is to always dump the command's stdout
and stderr to the sequence's stdout when in verbose mode or if the
command fails, even if Capture is used on the command.

Change-Id: Iac8fdf491b659ddf2ab79b593f70757551c6d99c
3 files changed