Rewrite GiST support code for rangetypes.
Rewrite GiST support code for rangetypes.

This patch installs significantly smarter penalty and picksplit functions
for ranges, making GiST indexes for them smaller and faster to search.

There is no on-disk format change, so no catversion bump, but you'd need
to REINDEX to get the benefits for any existing index.

Alexander Korotkov, reviewed by Jeff Davis

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