Improve closing files using pclose() which are opened by popen().

Pavan Deolasee provided the fix.

Conflicts:
	contrib/pgxc_ctl/coord_cmd.c
	contrib/pgxc_ctl/utils.c