compiler,runtime: pass old slice's ptr/len/cap by value to growslice

In the C calling convention, on AMD64, and probably a number of
other architectures, a 3-word struct argument is passed on stack.
This is less efficient than passing in three registers. Further,
this may affect the code generation in other part of the program,
even if the function is not actually called.

Slices are common in Go and append is a common slice operation,
which calls growslice in the growing path. To improve the code
generation, pass the slice header's three fields as separate
values, instead of a struct, to growslice.

The drawback is that this makes the runtime implementation
slightly diverges from the gc runtime.

Change-Id: Ieea46ab1c4e526ff3e7409d6af25e1f216dd1afa
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/168277
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 files changed