Set snprintf.c's maximum number of NL arguments to be 31.
Set snprintf.c's maximum number of NL arguments to be 31.

Previously, we used the platform's NL_ARGMAX if any, otherwise 16.
The trouble with this is that the platform value is hugely variable,
ranging from the POSIX-minimum 9 to as much as 64K on recent FreeBSD.
Values of more than a dozen or two have no practical use and slow down
the initialization of the argtypes array.  Worse, they cause snprintf.c
to consume far more stack space than was the design intention, possibly
resulting in stack-overflow crashes.

Standardize on 31, which is comfortably more than we need (it looks like
no existing translatable message has more than about 10 parameters).
I chose that, not 32, to make the array sizes powers of 2, for some
possible small gain in speed of the memset.

The lack of reported crashes suggests that the set of platforms we
use snprintf.c on (in released branches) may have no overlap with
the set where NL_ARGMAX has unreasonably large values.  But that's
not entirely clear, so back-patch to all supported branches.

Per report from Mateusz Guzik (via Thomas Munro).

Discussion: 941b9a686fc617bf8652cbe1c0acb6e61c00767d@mail.gmail.com

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