Check return value of strdup() in libpq connection option parsing.
Check return value of strdup() in libpq connection option parsing.

An out-of-memory in most of these would lead to strange behavior, like
connecting to a different database than intended, but some would lead to
an outright segfault.

Alex Shulgin and me. Backpatch to all supported versions.

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