Fix infinite sleep and failes of send in Win32.
Fix infinite sleep and failes of send in Win32.

1) pgwin32_waitforsinglesocket(): WaitForMultipleObjectsEx now called with
finite timeout (100ms) in case of FP_WRITE and UDP socket. If timeout occurs
then pgwin32_waitforsinglesocket() tries to write empty packet goes to
WaitForMultipleObjectsEx again.

2) pgwin32_send(): add loop around WSASend and pgwin32_waitforsinglesocket().
The reason is: for overlapped socket, 'ok' result from
pgwin32_waitforsinglesocket() isn't guarantee that socket is still free,
it can become busy again and following WSASend call will fail with
WSAEWOULDBLOCK error.

See http://archives.postgresql.org/pgsql-hackers/2006-10/msg00561.php

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