Feature: libcrmcommon: Add formatted output.
This commit adds a structure and a set of function pointers for doing
formatted output from pacemaker tools. The initial set is text and XML
but there is a mechanism to add others.
Basic usage is pretty straightforward. You create a new struct with
pcmkoutput_new, passing it the type and destination you want along
with any command line arguments. Then you call the init function and
then whatever output functions you need. End by calling the finish
function and then pcmkoutput_free.
The top-level output.c contains only high-level operations like
initialization and cleanup. Also, the basic function pointer structure
only contains generic functions that are useful everywhere. This is
stuff like making lists, outputting already formatted XML, outputting
the stdout/stderr of programs, etc. For all the various complex types
scattered throught various libraries, there is a mechanism to register
and call custom functions.
We do a lot of error printing in the tools that could be interspersed
with the formatted output, especially if that output is being written to
stdout. It is recommended that all error printing either go into a log
or to stderr so users can split them apart.