Fix concat_ws() to not insert a separator after leading NULL argument(s).
Fix concat_ws() to not insert a separator after leading NULL argument(s).

Per bug #6181 from Itagaki Takahiro.  Also do some marginal code cleanup
and improve error handling.

postmind-net/postgres-xl,ovr/postgres-xl,snaga/postgres-xl,kmjungersen/PostgresXL,postmind-net/postgres-xl,xinzweb/gpdb,snaga/postgres-xl,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,tpostgres-projects/tPostgres,50wu/gpdb,oberstet/postgres-xl,pavanvd/postgres-xl,techdragon/Postgres-XL,ashwinstar/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,lisakowen/gpdb,lisakowen/gpdb,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,Postgres-XL/Postgres-XL,jmcatamney/gpdb,jmcatamney/gpdb,yazun/postgres-xl,lisakowen/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,tpostgres-projects/tPostgres,oberstet/postgres-xl,adam8157/gpdb,adam8157/gpdb,techdragon/Postgres-XL,greenplum-db/gpdb,postmind-net/postgres-xl,yazun/postgres-xl,yazun/postgres-xl,ovr/postgres-xl,snaga/postgres-xl,pavanvd/postgres-xl,ovr/postgres-xl,ashwinstar/gpdb,oberstet/postgres-xl,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,ashwinstar/gpdb,xinzweb/gpdb,kmjungersen/PostgresXL,kmjungersen/PostgresXL,pavanvd/postgres-xl,lisakowen/gpdb,techdragon/Postgres-XL,zeroae/postgres-xl,kmjungersen/PostgresXL,techdragon/Postgres-XL,snaga/postgres-xl,50wu/gpdb,adam8157/gpdb,oberstet/postgres-xl,adam8157/gpdb,tpostgres-projects/tPostgres,techdragon/Postgres-XL,ashwinstar/gpdb,arcivanov/postgres-xl,postmind-net/postgres-xl,kmjungersen/PostgresXL,greenplum-db/gpdb,50wu/gpdb,50wu/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,yazun/postgres-xl,50wu/gpdb,greenplum-db/gpdb,ovr/postgres-xl,ashwinstar/gpdb,lisakowen/gpdb,adam8157/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,adam8157/gpdb,arcivanov/postgres-xl,postmind-net/postgres-xl,lisakowen/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,pavanvd/postgres-xl,ovr/postgres-xl,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,tpostgres-projects/tPostgres,snaga/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,lisakowen/gpdb,ashwinstar/gpdb,50wu/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,yazun/postgres-xl,xinzweb/gpdb,zeroae/postgres-xl,Postgres-XL/Postgres-XL,xinzweb/gpdb,zeroae/postgres-xl,tpostgres-projects/tPostgres,xinzweb/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,jmcatamney/gpdb,xinzweb/gpdb