Add various new features and bug fixes

Add lots of new features, fix many bugs, and incorporate various
improvements done by Andrew Tridgell, Russ Allbery, Hrvoje Niksic,
Damien Miller, and others for the Samba, INN, Wget, and OpenSSH
projects.  The additions include: support the "e", "E", "g", "G", and
"F" conversion specifiers (and use conversion style "f" or "F" for the
still unsupported "a" and "A" specifiers); support the "hh", "ll", "j",
"t", and "z" length modifiers; support the "#" flag and the (non-C99)
"'" flag; use localeconv(3) (if available) to get both the current
locale's decimal point character and the separator between groups of
digits; fix the handling of various corner cases of field width and
precision specifications; fix various floating point conversion bugs;
handle infinite and NaN floating point values; don't attempt to write to
the output buffer (which may be NULL) if a size of zero was specified;
check for integer overflow of the field width, precision, and return
values and during the floating point conversion; use the OUTCHAR() macro
instead of a function for better performance; provide asprintf(3) and
vasprintf(3) functions; add new test cases.  The replacement functions
have been renamed to use an "rpl_" prefix, the function calls in the
main project (and in this file) must be redefined accordingly for each
replacement function which is needed (by using Autoconf or other means).
Various other minor improvements have been applied and the coding style
was cleaned up for consistency.
Release 1.0
Don't force strict C89 mode

Don't force strict C89 mode, as we want to test "long long" support, for
example.
Don't set *overflow in cast()

Setting *overflow to 1 in cast() was redundant, as returning INTMAX_MAX
signals overflow already (a regular conversion to INTMAX_MAX is not
supported).
Apply minor comment fixes
Fix infinity detection (at least) on IRIX
Don't use lc->thousands_sep if it's a NULL pointer

In printsep(), make sure that lc->thousands_sep is not a NULL pointer
before using it.  Also, if it points to a multi-character separator,
simply call OUTCHAR() for each character; using fmtstr() in this case
(as we did before) doesn't gain anything.
Limit range of exponent

Make sure the value returned by getexponent() will be in the range of
-99 to 99 under all circumstances and omit the now completely redundant
checks for overflow of the econvert buffer (which holds the exponent).
If lc->thousands_sep is a NULL pointer, use ","
Fix typo (INTMAX_MAX vs. UINTMAX_MAX)
Release 1.1
Remove some code duplication

Within rpl_vsnprintf(), let all floating point conversion specifiers
fall into a single switch case in order to remove some code duplication.
EOVERFLOW if output string is larger than INT_MAX

If the number of bytes required to hold the output string (excluding the
nul-termination) is larger than INT_MAX, return -1 and set errno to
EOVERFLOW (if available).  Before, we used ERANGE in this case and we
also did that if the number of required bytes was equal to INT_MAX.  The
latter behaviour had the advantage that users could safely increment any
positive return value by one (in order to calculate the required buffer
size) even without converting it to a larger or unsigned integer type.
However, as other implementations may return INT_MAX, users should
handle this case anyway.  The new behaviour is defined by an XSI
extension to POSIX (IEEE Std 1003.1, 2004 Edition), though this
extension also mandates to fail with EOVERFLOW if the buffer size
specified by the user is greater than INT_MAX; which we won't do, as
this alone is not a problem whatsoever.  Note that C99 doesn't specify
the error handling.