[dev.regabi] cmd/compile: remove nested functions from expands_calls.go
[dev.regabi] cmd/compile: remove nested functions from expands_calls.go

Replace nested function spaghetti with state object and methods.
Still somewhat complex, but a bit more explicit.

Change-Id: I21987c8e4be75821faa5a248af05d2095cdfb0d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/287132
Trust: David Chase <ae171625adc8645b8b79b7e405a6da5aba5341e0@google.com>
Run-TryBot: David Chase <ae171625adc8645b8b79b7e405a6da5aba5341e0@google.com>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>

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