[dev.typeparams] cmd/compile: sort iface fields before expansion
[dev.typeparams] cmd/compile: sort iface fields before expansion

For toolstash -cmp compatibility with types2, we also need to sort
fields (or at least the embedded types) *before* expanding them. This
is relevant to what position information and parameter names are used
for methods when embedded interfaces have overlapping methods.

This came up in archive/zip, which has:

	type fileInfoDirEntry interface {
		fs.FileInfo
		fs.DirEntry
	}

and both of these embedded interfaces in turn have an "IsDir() bool"
method. Traditionally, cmd/compile would keep the method from
fs.FileInfo.IsDir, but with types2 it will now keep fs.DirEntry.IsDir
instead. This doesn't affect correctness at all, but it does end up in
DWARF sometimes.

Change-Id: Iac8d6321894be335466a76b5bf8a0c1b15a3581b
Reviewed-on: https://go-review.googlesource.com/c/go/+/324330
Trust: Matthew Dempsky <e56ac2c500064424afac424d4b5e53bd0570a731@google.com>
Run-TryBot: Matthew Dempsky <e56ac2c500064424afac424d4b5e53bd0570a731@google.com>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@golang.org>

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