Perform cleanup in bfd_close after errors
It seems reasonable to continue after errors in bfd_close_all_done,
particularly since bfd_close_all_done is typically called on an output
file after we've hit some sort of error elsewhere. The iovec test is
necessary if bfd_close_all_done is to work on odd bfd's opened by
bfd_create.
* opncls.c (bfd_close): Call bfd_close_all_done after errors
from _bfd_write_contents.
(bfd_close_all_done): Call _bfd_delete_bfd after errors.
Don't call iovec->bclose when iovec is NULL.