Fix PE linker wibbles

Authored by Phyx on Oct 4 2018, 12:50 PM.


Fix PE linker wibbles

Fix some various issues that popped up because the linker now doesn't
load import libraries for longer than it needs to.

These are all use after free issues.

Test Plan: ./validate

Reviewers: bgamari, erikd, simonmar

Reviewed By: bgamari

Subscribers: simonpj, rwbarton, carter

Differential Revision: