compiler: open code string slice expressions

Currently a string slice expression is implemented with a runtime
call __go_string_slice. Change it to open code it, which is more
efficient, and allows the backend to further optimize it.

Also omit the write barrier for length-only update (i.e.
s = s[:n]).

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