tdata related object_p tidy for various formats

The aout object_p function copies any existing tdata.  Apparently this
was done for hp300, an old target that is no longer supported.  See
commit ebd241352942.  This isn't useful for current sources, nor is it
necessary or useful any more to preserve tdata in object_p functions
when a target doesn't match.  When I was fixing this, I noticed some
object_p functions rudely didn't release memory on failures, and
others had nits in the bfd_error returns.

	* aoutx.h (some_aout_object_p): Don't restore previous tdata
	on failure.  Don't copy any existing tdata.
	* archive.c (bfd_generic_archive_p): Don't restore previous
	tdata on failure.
	* pdp11.c (some_aout_object_p): Likewise.
	* coff-rs6000.c (_bfd_xcoff_archive_p): Allocate both artdata
	and extension in one call.  Don't restore previous tdata on
	failure.
	* coff64-rs6000.c (xcoff64_archive_p): Likewise.
	* coffgen.c (coff_real_object_p): Don't restore previous
	tdata on failure.
	* ihex.c (ihex_object_p): Likewise.  Simplify release of tdata
	on scan failure.
	* mach-o.c (bfd_mach_o_scan): Don't set tdata here.  Do set
	error on read_command failure.
	(bfd_mach_o_header_p): Set tdata here, release on failure.
	Tidy bfd_error return values.
	(bfd_mach_o_fat_archive_p): Tidy error return values.
	* mmo.c (mmo_mkobject): Do not test current tdata.
	* pef.c (bfd_pef_scan_start_address): Set bfd_error on
	failure.
	(bfd_pef_scan): Don't set tdata here.
	(bfd_pef_object_p): Set tdata here, release on failure.  Tidy
	bfd_error return values.
	(bfd_pef_xlib_object_p): Tidy bfd_error return values.
	* srec.c (srec_object_p): Don't restore previous tdata on
	failure.  Do release tdata on failure.
	(symbolsrec_object_p): Likewise.
	* tekhex.c (tekhex_object_p): Don't ignore tekhex_mkobject
	failure.  Release tdata on failure.
	* vms-alpha.c (alpha_vms_object_p): Don't restore previous
	tdata on failure.  Simplify release of tdata.
	* xsym.c (bfd_sym_scan): Don't set tdata here.
	(bfd_sym_object_p): Set tdata here.  Release on failure.
14 files changed