Improve handling of numeric-valued variables in pgbench.
Improve handling of numeric-valued variables in pgbench.

The previous coding always stored variable values as strings, doing
conversion on-the-fly when a numeric value was needed or a number was to be
assigned.  This was a bit inefficient and risked loss of precision for
floating-point values.  The precision aspect had been hacked around by
printing doubles in "%.18e" format, which is ugly and has machine-dependent
results.  Instead, arrange to preserve an assigned numeric value in the
original binary numeric format, converting to string only when and if
needed.  When we do need to convert a double to string, convert in "%g"
format with DBL_DIG precision, which is the standard way to do it and
produces the least surprising results in most cases.

The implementation supports storing both a string value and a numeric
value for any one variable, with lazy conversion between them.  I also
arranged for lazy re-sorting of the variable array when new variables are
added.  That was mainly to allow a clean refactoring of putVariable()
into two levels of subroutine, but it may allow us to save a few sorts.

Discussion: <425689619a246ed4e5299bf8bc2bd76e2b6434a5@sss.pgh.pa.us>

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