Eliminate some repetitive coding in tuplesort.c.
Eliminate some repetitive coding in tuplesort.c.

Use a macro LogicalTapeReadExact() to encapsulate the error check when
we want to read an exact number of bytes from a "tape".  Per a suggestion
of Takahiro Itagaki.

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