runtime: have typelinksinit work forwards
runtime: have typelinksinit work forwards

For reasons I have forgotten typelinksinit processed modules backwards.
(I suspect this was an attempt to process types in the executing
binary first.)

It does not appear to be necessary, and it is not the order we want
when a module can be loaded at an arbitrary point during a program's
execution as a plugin. So reverse the order.

While here, make it safe to call typelinksinit multiple times.

Change-Id: Ie10587c55c8e5efa0542981efb6eb3c12dd59e8c
Reviewed-on: https://go-review.googlesource.com/27822
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

nawawi/go,Cofyc/go,codestation/go,goodlang/good,goodlang/good,Cofyc/go,momchil-velikov/go,polyverse-security/go,linux-on-ibm-z/go,goodlang/good,linux-on-ibm-z/go,josharian/go,cloudflare/go,codestation/go,ImJasonH/go,nawawi/go,linux-on-ibm-z/go,nawawi/go,derekmarcotte/go,ImJasonH/go,akutz/go,polyverse-security/go,codestation/go,cloudflare/go,Cofyc/go,goodlang/good,momchil-velikov/go,vsekhar/elastic-go,Cofyc/go,cloudflare/go,ImJasonH/go,Cofyc/go,CAFxX/go,josharian/go,golang/go,linux-on-ibm-z/go,nawawi/go,suncycheng/go,momchil-velikov/go,Cofyc/go,CAFxX/go,momchil-velikov/go,akutz/go,linux-on-ibm-z/go,golang/go,Cofyc/go,cloudflare/go,polyverse-security/go,nawawi/go,suncycheng/go,josharian/go,ImJasonH/go,momchil-velikov/go,vsekhar/elastic-go,ImJasonH/go,momchil-velikov/go,christopher-henderson/Go,akutz/go,josharian/go,suncycheng/go,cloudflare/go,golang/go,cloudflare/go,suncycheng/go,akutz/go,codestation/go,suncycheng/go,cloudflare/go,golang/go,polyverse-security/go,josharian/go,CAFxX/go,CAFxX/go,momchil-velikov/go,derekmarcotte/go,derekmarcotte/go,suncycheng/go,codestation/go,nawawi/go,momchil-velikov/go,akutz/go,golang/go,polyverse-security/go,nawawi/go,vsekhar/elastic-go,vsekhar/elastic-go,codestation/go,vsekhar/elastic-go,akutz/go,derekmarcotte/go,goodlang/good,codestation/go,akutz/go,derekmarcotte/go,polyverse-security/go,derekmarcotte/go,cloudflare/go,nawawi/go,goodlang/good,golang/go,vsekhar/elastic-go,ImJasonH/go,CAFxX/go,suncycheng/go,vsekhar/elastic-go,CAFxX/go,akutz/go,CAFxX/go,derekmarcotte/go,Cofyc/go,polyverse-security/go,linux-on-ibm-z/go,ImJasonH/go,golang/go,goodlang/good,goodlang/good,linux-on-ibm-z/go,codestation/go,golang/go,ImJasonH/go,josharian/go,vsekhar/elastic-go,josharian/go,CAFxX/go,josharian/go,linux-on-ibm-z/go,polyverse-security/go,derekmarcotte/go,suncycheng/go