Fix NUMERIC field access macros to treat NaNs consistently.
Fix NUMERIC field access macros to treat NaNs consistently.

Commit 145343534c153d1e6c3cff1fa1855787684d9a38 arranged to store numeric
NaN values as short-header numerics, but the field access macros did not
get the memo: they thought only "SHORT" numerics have short headers.

Most of the time this makes no difference because we don't access the
weight or dscale of a NaN; but numeric_send does that.  As pointed out
by Andrew Gierth, this led to fetching uninitialized bytes.

AFAICS this could not have any worse consequences than that; in particular,
an unaligned stored numeric would have been detoasted by PG_GETARG_NUMERIC,
so that there's no risk of a fetch off the end of memory.  Still, the code
is wrong on its own terms, and it's not hard to foresee future changes that
might expose us to real risks.  So back-patch to all affected branches.

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