Tighten up application of parallel mode checks.
Tighten up application of parallel mode checks.

Commit 924bcf4f16d54c55310b28f77686608684734f42 failed to enforce
parallel mode checks during the commit of a parallel worker, because
we exited parallel mode prior to ending the transaction so that we
could pop the active snapshot.  Re-establish parallel mode during
parallel worker commit.  Without this, it's far too easy for unsafe
actions during the pre-commit sequence to crash the server instead of
hitting the error checks as intended.

Just to be extra paranoid, adjust a couple of the sanity checks in
xact.c to check not only IsInParallelMode() but also
IsParallelWorker().

greenplum-db/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,jmcatamney/gpdb,xinzweb/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,adam8157/gpdb,ashwinstar/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,adam8157/gpdb,50wu/gpdb,jmcatamney/gpdb,50wu/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,50wu/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,adam8157/gpdb,lisakowen/gpdb,greenplum-db/gpdb,lisakowen/gpdb,ashwinstar/gpdb,adam8157/gpdb,adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,adam8157/gpdb,jmcatamney/gpdb