cmd/doc: always print package clause except for commands
cmd/doc: always print package clause except for commands

There was an implicit heuristic before about when to print the
package clause or omit it, but it was undocumented and confusing.
Get rid of it and print it always unless asking for the package
docs for a command, which are more of a usage message than a
programming question. This simplifies the processing.

There are several paths to the output, so to put the fix in one
place we place a wrapper before the output buffer than adds the
clause when Write is first called.

The tests don't verify this behavior, but they didn't before either.
Unsure what the right approach is but this will do for now.

Fixes #31457

Change-Id: Ia6a9e740d556f45265c55f06b5306621c7a40ea9
Reviewed-on: https://go-review.googlesource.com/c/go/+/177797
Reviewed-by: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

cloudflare/go,cloudflare/go,CAFxX/go,cloudflare/go,CAFxX/go,cloudflare/go,golang/go,golang/go,nawawi/go,golang/go,akutz/go,nawawi/go,akutz/go,golang/go,nawawi/go,akutz/go,akutz/go,golang/go,CAFxX/go,golang/go,CAFxX/go,CAFxX/go,cloudflare/go,CAFxX/go,cloudflare/go,akutz/go,golang/go,CAFxX/go,akutz/go,cloudflare/go,nawawi/go,cloudflare/go,nawawi/go,nawawi/go,akutz/go,nawawi/go,golang/go,nawawi/go,CAFxX/go,akutz/go