runtime: move osinit to Go

This is a step toward updating libgo to 1.13.  This adds the 1.13
version of the osinit function to Go code, and removes the
corresponding code from the C runtime.  This should simplify future updates.
Some additional 1.13 code was brought in to simplify this change.

Change-Id: I7cb17ad89f62dec0342a3b98daac3045e473b7b3
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/191717
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
29 files changed