Introduce PRINTSIZE macro to help declare right-sized buffers.

The size of a buffer needed to safely sprintf() an integral type can
be computed from the sizeof() the type.  Doing so ensures we don't
waste stack space declaring "big enough" buffers that are way bigger
than we actually need; and shall ensure, if we ever port to systems
with bigger integral types, that "big enough" really is.

Made assorted variables more local in the process
Merge pull request #1582 from ediosyncratic/printsize-dev

Introduce PRINTSIZE macro to help declare right-sized buffers.