Be more aggressive about adding flags to thread compiles.  The configure test only tests for building a binary, not building a shared library.
Be more aggressive about adding flags to thread compiles.  The configure
test only tests for building a binary, not building a shared library.

On Linux, you can build a binary with -pthread, but you can't build a
binary that uses a threaded shared library unless you also use -pthread
when building the binary, or adding -lpthread to the shared library
build.  This patch has the effect of doing the later by adding both
-pthread and -lpthread when building libpq.

0x0FFF/gpdb,Chibin/gpdb,royc1/gpdb,lintzc/gpdb,Chibin/gpdb,lisakowen/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,0x0FFF/gpdb,royc1/gpdb,foyzur/gpdb,jmcatamney/gpdb,zaksoup/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,postmind-net/postgres-xl,greenplum-db/gpdb,foyzur/gpdb,lisakowen/gpdb,50wu/gpdb,snaga/postgres-xl,ashwinstar/gpdb,lisakowen/gpdb,chrishajas/gpdb,lintzc/gpdb,Chibin/gpdb,CraigHarris/gpdb,royc1/gpdb,CraigHarris/gpdb,ahachete/gpdb,lisakowen/gpdb,zaksoup/gpdb,edespino/gpdb,xuegang/gpdb,foyzur/gpdb,lpetrov-pivotal/gpdb,ahachete/gpdb,lisakowen/gpdb,lintzc/gpdb,cjcjameson/gpdb,ahachete/gpdb,kaknikhil/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xuegang/gpdb,Quikling/gpdb,yuanzhao/gpdb,tpostgres-projects/tPostgres,snaga/postgres-xl,yazun/postgres-xl,tangp3/gpdb,Quikling/gpdb,atris/gpdb,royc1/gpdb,Quikling/gpdb,cjcjameson/gpdb,edespino/gpdb,rvs/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,chrishajas/gpdb,tangp3/gpdb,Chibin/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,randomtask1155/gpdb,0x0FFF/gpdb,rvs/gpdb,techdragon/Postgres-XL,cjcjameson/gpdb,cjcjameson/gpdb,xinzweb/gpdb,ovr/postgres-xl,techdragon/Postgres-XL,xuegang/gpdb,royc1/gpdb,kaknikhil/gpdb,Quikling/gpdb,tangp3/gpdb,pavanvd/postgres-xl,edespino/gpdb,0x0FFF/gpdb,snaga/postgres-xl,randomtask1155/gpdb,yazun/postgres-xl,50wu/gpdb,xinzweb/gpdb,kaknikhil/gpdb,royc1/gpdb,Chibin/gpdb,rubikloud/gpdb,xinzweb/gpdb,zeroae/postgres-xl,ahachete/gpdb,Chibin/gpdb,ashwinstar/gpdb,lintzc/gpdb,50wu/gpdb,50wu/gpdb,rvs/gpdb,rvs/gpdb,kaknikhil/gpdb,janebeckman/gpdb,tpostgres-projects/tPostgres,50wu/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,kmjungersen/PostgresXL,atris/gpdb,atris/gpdb,postmind-net/postgres-xl,xinzweb/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,royc1/gpdb,CraigHarris/gpdb,ahachete/gpdb,lpetrov-pivotal/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,janebeckman/gpdb,chrishajas/gpdb,xuegang/gpdb,atris/gpdb,lintzc/gpdb,greenplum-db/gpdb,adam8157/gpdb,adam8157/gpdb,lpetrov-pivotal/gpdb,rvs/gpdb,foyzur/gpdb,randomtask1155/gpdb,zaksoup/gpdb,oberstet/postgres-xl,edespino/gpdb,jmcatamney/gpdb,rubikloud/gpdb,rubikloud/gpdb,arcivanov/postgres-xl,0x0FFF/gpdb,foyzur/gpdb,Quikling/gpdb,foyzur/gpdb,lintzc/gpdb,edespino/gpdb,postmind-net/postgres-xl,xuegang/gpdb,Postgres-XL/Postgres-XL,chrishajas/gpdb,Chibin/gpdb,ovr/postgres-xl,edespino/gpdb,yuanzhao/gpdb,zeroae/postgres-xl,techdragon/Postgres-XL,yazun/postgres-xl,tpostgres-projects/tPostgres,ashwinstar/gpdb,lpetrov-pivotal/gpdb,cjcjameson/gpdb,0x0FFF/gpdb,randomtask1155/gpdb,adam8157/gpdb,atris/gpdb,adam8157/gpdb,yazun/postgres-xl,jmcatamney/gpdb,zaksoup/gpdb,cjcjameson/gpdb,Quikling/gpdb,rubikloud/gpdb,yuanzhao/gpdb,pavanvd/postgres-xl,adam8157/gpdb,zeroae/postgres-xl,tangp3/gpdb,adam8157/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,janebeckman/gpdb,zeroae/postgres-xl,royc1/gpdb,greenplum-db/gpdb,Chibin/gpdb,janebeckman/gpdb,lisakowen/gpdb,ahachete/gpdb,lintzc/gpdb,xinzweb/gpdb,chrishajas/gpdb,kaknikhil/gpdb,janebeckman/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,snaga/postgres-xl,zaksoup/gpdb,Postgres-XL/Postgres-XL,chrishajas/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,Quikling/gpdb,oberstet/postgres-xl,Chibin/gpdb,kaknikhil/gpdb,foyzur/gpdb,kmjungersen/PostgresXL,tangp3/gpdb,oberstet/postgres-xl,cjcjameson/gpdb,jmcatamney/gpdb,kmjungersen/PostgresXL,cjcjameson/gpdb,xinzweb/gpdb,lisakowen/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,pavanvd/postgres-xl,postmind-net/postgres-xl,xuegang/gpdb,tangp3/gpdb,kmjungersen/PostgresXL,lpetrov-pivotal/gpdb,edespino/gpdb,arcivanov/postgres-xl,50wu/gpdb,xuegang/gpdb,randomtask1155/gpdb,Quikling/gpdb,zaksoup/gpdb,randomtask1155/gpdb,zaksoup/gpdb,yazun/postgres-xl,CraigHarris/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,rubikloud/gpdb,tangp3/gpdb,rubikloud/gpdb,ashwinstar/gpdb,ovr/postgres-xl,ovr/postgres-xl,Postgres-XL/Postgres-XL,Chibin/gpdb,Quikling/gpdb,rubikloud/gpdb,CraigHarris/gpdb,ovr/postgres-xl,xuegang/gpdb,chrishajas/gpdb,lintzc/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,kaknikhil/gpdb,xinzweb/gpdb,lintzc/gpdb,snaga/postgres-xl,edespino/gpdb,pavanvd/postgres-xl,tangp3/gpdb,arcivanov/postgres-xl,50wu/gpdb,atris/gpdb,rubikloud/gpdb,yuanzhao/gpdb,rvs/gpdb,tpostgres-projects/tPostgres,techdragon/Postgres-XL,janebeckman/gpdb,tpostgres-projects/tPostgres,0x0FFF/gpdb,CraigHarris/gpdb,foyzur/gpdb,yuanzhao/gpdb,chrishajas/gpdb,arcivanov/postgres-xl,yuanzhao/gpdb,Postgres-XL/Postgres-XL,janebeckman/gpdb,randomtask1155/gpdb,50wu/gpdb,lpetrov-pivotal/gpdb,rvs/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,janebeckman/gpdb,adam8157/gpdb,Quikling/gpdb,kmjungersen/PostgresXL,rvs/gpdb,postmind-net/postgres-xl,kaknikhil/gpdb,kaknikhil/gpdb,atris/gpdb,edespino/gpdb,edespino/gpdb,janebeckman/gpdb,randomtask1155/gpdb,ahachete/gpdb,rvs/gpdb,lisakowen/gpdb,adam8157/gpdb,janebeckman/gpdb,zaksoup/gpdb,xuegang/gpdb,ahachete/gpdb,atris/gpdb,arcivanov/postgres-xl