cmd/go: ensure external test files are presented to the linker first
cmd/go: ensure external test files are presented to the linker first

Fixes issue 7627.

CL 61970044 changed the order in which .a files are passed to gccgo's link phase. However by reversing the order it caused gccgo to complain if both internal (liba.a) and external (liba_test.a) versions of a package were presented as the former would not contain all the necessary symbols, and the latter would duplicate symbols already defined.

This change ensures that all 'fake' targets remain at the top of the final link order which should be fine as a package compiled as an external test is a superset of its internal sibling.

Looking at how gcToolchain links tests I think this change now accurately mirrors those actions which present $WORK/_test before $WORK in the link order.

LGTM=iant
R=rsc, iant
CC=golang-codereviews, michael.hudson
https://codereview.appspot.com/80300043

rdp/rogerpack2005-golang,rdp/rogerpack2005-golang,d0f/go-zh,bryanxu/go-zh,rdp/rogerpack2005-golang,d0f/go-zh,rdp/rogerpack2005-golang,sanjosh/sanjos100-tipc,d0f/go-zh,bryanxu/go-zh,bryanxu/go-zh,d0f/go-zh,bryanxu/go-zh,d0f/go-zh,bryanxu/go-zh,webfd/go-zh,rdp/rogerpack2005-golang,bryanxu/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,webfd/go-zh,sanjosh/sanjos100-tipc,webfd/go-zh,bryanxu/go-zh,rdp/rogerpack2005-golang,d0f/go-zh,webfd/go-zh,webfd/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,webfd/go-zh,webfd/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,webfd/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,bryanxu/go-zh,rdp/rogerpack2005-golang,rdp/rogerpack2005-golang