Fix file descriptor leak after failure of a \setshell command in pgbench.
Fix file descriptor leak after failure of a \setshell command in pgbench.

If the called command fails to return data, runShellCommand forgot to
pclose() the pipe before returning.  This is fairly harmless in the current
code, because pgbench would then abandon further processing of that client
thread; so no more than nclients descriptors could be leaked this way.  But
it's not hard to imagine future improvements whereby that wouldn't be true.
In any case, it's sloppy coding, so patch all branches.  Found by Coverity.

ashwinstar/gpdb,jmcatamney/gpdb,xinzweb/gpdb,50wu/gpdb,Postgres-XL/Postgres-XL,jmcatamney/gpdb,lisakowen/gpdb,ovr/postgres-xl,greenplum-db/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,adam8157/gpdb,oberstet/postgres-xl,xinzweb/gpdb,xinzweb/gpdb,ashwinstar/gpdb,oberstet/postgres-xl,adam8157/gpdb,oberstet/postgres-xl,50wu/gpdb,jmcatamney/gpdb,50wu/gpdb,lisakowen/gpdb,pavanvd/postgres-xl,pavanvd/postgres-xl,ovr/postgres-xl,techdragon/Postgres-XL,adam8157/gpdb,zeroae/postgres-xl,50wu/gpdb,lisakowen/gpdb,yazun/postgres-xl,ashwinstar/gpdb,xinzweb/gpdb,yazun/postgres-xl,greenplum-db/gpdb,techdragon/Postgres-XL,yazun/postgres-xl,adam8157/gpdb,zeroae/postgres-xl,50wu/gpdb,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,ovr/postgres-xl,yazun/postgres-xl,lisakowen/gpdb,pavanvd/postgres-xl,ovr/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,xinzweb/gpdb,oberstet/postgres-xl,lisakowen/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,Postgres-XL/Postgres-XL,zeroae/postgres-xl,ashwinstar/gpdb,ovr/postgres-xl,xinzweb/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,oberstet/postgres-xl,adam8157/gpdb,adam8157/gpdb,xinzweb/gpdb,techdragon/Postgres-XL,yazun/postgres-xl,greenplum-db/gpdb,50wu/gpdb,zeroae/postgres-xl,lisakowen/gpdb,pavanvd/postgres-xl