[COFF] clean up global resources after completion
[COFF] clean up global resources after completion

Patch by Andrew Kelley.

Previously, running lld::coff::link() twice in the same process would
access stale pointers because of these global variables not being reset.
After this patch, lld::coff::link() can be called any number of times,
just like its ELF and MACH-O counterparts.

Differential Revision: https://reviews.llvm.org/D49856

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@338042 91177308-0d34-0410-b5e6-96231b3b80d8

llvm-mirror/lld,llvm-mirror/lld