cmd/compile: fix typechecking in finishcompare
cmd/compile: fix typechecking in finishcompare

Previously, finishcompare just used SetTypecheck, but this didn't
recursively update any untyped bool typed subexpressions. This CL
changes it to call typecheck, which correctly handles this.

Also cleaned up outdated code for simplifying logic.

Updates #23834

Change-Id: Ic7f92d2a77c2eb74024ee97815205371761c1c90
Reviewed-on: https://go-review.googlesource.com/97035
Reviewed-by: Matthew Dempsky <e56ac2c500064424afac424d4b5e53bd0570a731@google.com>

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