compiler: support inlining functions that use index expressions

Also move the determine_types pass on an inlined function body to one
place, rather than doing it ad hoc as needed.

This adds 79 new inlinable functions in the standard library, such as
bytes.HasPrefix and bytes.LastIndexByte.

Change-Id: I7d37cd5539d839274123eaeb1b00d735efe0bd96
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181261
Reviewed-by: Cherry Zhang <cherryyz@google.com>
5 files changed