Close elements of output archive

When cleaning up an archive, close all its elements.  This fixes a
number of ar memory leaks.

bfd/
	* archive.c (_bfd_archive_close_and_cleanup): Close elements
	of an archive open for writing.
binutils/
	* objcopy.c (copy_archive): Don't close output archive
	elements here.
	* dlltool.c (gen_lib_file): Likewise.
ld/
	* pe-dll.c (pe_dll_generate_implib): Don't close output
	archive elements here.
4 files changed