Fix pg_plan_queries() to restore the previous setting of ActiveSnapshot (probably NULL) before exiting.  Up to now it's just left the variable as it set it, which means that after we're done processing the current client message, ActiveSnapshot is probably pointing at garbage (because this function is typically run in MessageContext which will get reset).  There doesn't seem to have been any code path in which that mattered before 8.3, but now the plancache module might try to use the stale value if the next client message is a Bind for a prepared statement that is in need of replanning.  Per report from Alex Hunsaker.
Fix pg_plan_queries() to restore the previous setting of ActiveSnapshot
(probably NULL) before exiting.  Up to now it's just left the variable as it
set it, which means that after we're done processing the current client
message, ActiveSnapshot is probably pointing at garbage (because this function
is typically run in MessageContext which will get reset).  There doesn't seem
to have been any code path in which that mattered before 8.3, but now the
plancache module might try to use the stale value if the next client message
is a Bind for a prepared statement that is in need of replanning.  Per report
from Alex Hunsaker.

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