fix exec_close to be multi-target-aware

This changes exec_close so it doesn't close inferiors from other
targets.

2014-07-29  Tom Tromey  <tromey@redhat.com>

	* target.h (target_stack_decref_cleanup): Declare.
	* exec.c (exec_xclose_1): Skip program spaces from other targets.
	* target.c (target_stack_decref_cleanup): New function.
3 files changed