Check for interrupts and stack overflow during rule/view dumps.
Check for interrupts and stack overflow during rule/view dumps.

Since ruleutils.c recurses, it could be driven to stack overflow by
deeply nested constructs.  Very large queries might also take long
enough to deparse that a check for interrupts seems like a good idea.
Stick appropriate tests into a couple of key places.

Noted by Greg Stark.  Back-patch to all supported branches.

adam8157/gpdb,xinzweb/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ovr/postgres-xl,pavanvd/postgres-xl,greenplum-db/gpdb,ashwinstar/gpdb,yazun/postgres-xl,adam8157/gpdb,50wu/gpdb,yazun/postgres-xl,oberstet/postgres-xl,yazun/postgres-xl,Postgres-XL/Postgres-XL,adam8157/gpdb,yazun/postgres-xl,50wu/gpdb,lisakowen/gpdb,techdragon/Postgres-XL,greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,lisakowen/gpdb,ovr/postgres-xl,adam8157/gpdb,ovr/postgres-xl,xinzweb/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,adam8157/gpdb,greenplum-db/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,ashwinstar/gpdb,xinzweb/gpdb,50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,xinzweb/gpdb,yazun/postgres-xl,jmcatamney/gpdb,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,50wu/gpdb,jmcatamney/gpdb,Postgres-XL/Postgres-XL,jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,zeroae/postgres-xl,xinzweb/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,50wu/gpdb,ashwinstar/gpdb,50wu/gpdb,50wu/gpdb,Postgres-XL/Postgres-XL,techdragon/Postgres-XL,greenplum-db/gpdb,oberstet/postgres-xl,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,ovr/postgres-xl,zeroae/postgres-xl,adam8157/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,zeroae/postgres-xl,lisakowen/gpdb,oberstet/postgres-xl,lisakowen/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,ashwinstar/gpdb,xinzweb/gpdb,ovr/postgres-xl,zeroae/postgres-xl,greenplum-db/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb