slog: improve test for commonHandler
slog: improve test for commonHandler

Allow Attrs to vary by test case.

Test both text and JSON.

Change-Id: I291d723efe4f976451f0ab08a8777b9a74b7347a
Reviewed-on: https://go-review.googlesource.com/c/exp/+/435895
Reviewed-by: Alan Donovan <7069e9552f9d110b0a0f326b96f22f63fb99dfc1@google.com>
Run-TryBot: Jonathan Amsterdam <e3d3698b2ccd5955e4adf250d0785062d0f9018b@google.com>

golang/exp,golang/exp,golang/exp