cmd/compile/internal/types2: fix incorrect result type of Checker.index
cmd/compile/internal/types2: fix incorrect result type of Checker.index

While at it, add missing "invalid argument: " prefix
to a couple of local error messages, for consistency.

For #45667.

Change-Id: I814800b2f3f3750583e335c98a3f8e27030a9daa
Reviewed-on: https://go-review.googlesource.com/c/go/+/312309
Trust: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@golang.org>
Run-TryBot: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@golang.org>
Reviewed-by: Robert Findley <9179eee875d1ee628c37fb47d7e749e855ffd21f@google.com>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

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