Fold many functions into one
The result is not much more convoluted than the original was, but much shorter.
Several vararg macros were added -- no idea what !gcc compilers make of this.
The messages sent to these functions are inconsistent across the source tree.
I have now decided that the logging function will add the final newline -
messages will need to be modified accordingly.
I have no idea why the original implementation was as complicated and ugly as
it was. My guess is that it was anticipated that these are be called from
sighandlers, but why no snprintf when they are all stuffed up with vsnprintf...
Still, the result is not worse in this regard either.