cmd/ld: close outfile before cleanup

This prevents the temporary directory from being leaked when
the linker is run on a FUSE filesystem.

Fixes issue 8684.

LGTM=bradfitz
R=golang-codereviews, rsc, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/141840043

Committer: Brad Fitzpatrick <bradfitz@golang.org>