cmd/compile/internal/gc: simplify typechecking definitions
cmd/compile/internal/gc: simplify typechecking definitions

There are only a handful of nodes that we need to pass to
typecheckdef (OLITERAL, ONAME, OTYPE, and ONONAME), but typecheck1
takes the awkward approach of calling typecheckdef on every node with
Sym != nil, and then excluding a long list of uninteresting Ops that
have a non-nil Sym.

Passes toolstash-check.

Change-Id: I0271d2faff0208ad57ddc1f1a540a5fbed870234
Reviewed-on: https://go-review.googlesource.com/c/142657
Run-TryBot: Matthew Dempsky <e56ac2c500064424afac424d4b5e53bd0570a731@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>

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