Adds a testing/diagtest package similar to
the previously added iotest package (#12377)
which writes log messages to a testing.TB's log stream.
This makes tests less noisy and helps associate error messages
with the exact test cases they came from.
diagtest, unlike iotest, prefixes each message with stdout or stderr.
To reuse iotest.LogWriter for this, we add support to iotest.LogWriter
to specify an optional prefix string.
Adds a new iotest subpackage to the common/testing package
and moves the testLogWriter used in a prior integration test
into this directory.
The new API is:
package iotest
func LogWriter(testing.TB) io.Writer
This is a generally useful utility in any test that needs an io.Writer,
where we want them to not pollute actual stdout or stderr.