compiler, libgo: change mangling scheme

Overhaul the mangling scheme to avoid ambiguities if the package path
contains a dot. Instead of using dot both to separate components and
to mangle characters, use dot only to separate components and use
underscore to mangle characters.

For golang/go#41862

Change-Id: Iddc04422673a4cdc6773d24d3d75fc8945266773
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/271726
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
56 files changed