slog: improve handler test
slog: improve handler test

Write output to a string instead of a map.
It's more accurate (e.g. order matters) and closer
to a real handler.

Change-Id: Ia410ff0dd99bb93db39a6954f7ffd1c5709555cc
Reviewed-on: https://go-review.googlesource.com/c/exp/+/432182
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Alan Donovan <7069e9552f9d110b0a0f326b96f22f63fb99dfc1@google.com>
Run-TryBot: Jonathan Amsterdam <e3d3698b2ccd5955e4adf250d0785062d0f9018b@google.com>

golang/exp,golang/exp,golang/exp