Refactor: xml: add&use internal API for external-buffer-free serializing
This shall speed the original full-buffer gather-then-print round-trip
up a little bit, sparing also memory (and hence costly reallocation,
perhaps) to some extent.
For cibadmin in particular, this is a preparation for when we use the
same code path to also output generalized XML (e.g. incl. namespaces
that will be used shortly, to annotate ACL permissions as evaluated
for given user).
Note that we now also output sensibly readable XML for cases when
quotes/apostrophes are used since libxml is supposed to serialize
XML in the most optimal way (unlike our reinvented code) -- ACLs
regression test suite reflects that change.
Finally, the internal API only function at hand,
pcmk__xml_serialize_fd_formatted, would be the desired step towards
lowering memory requirements of pacemaker code whenever the XML is
output to a file-like abstraction (a comment is added to that effect).
Original commit by jnpkrn
Minor edits by waltdisgrace
closes T164