Refactor: libcrmcommon: Some best practices in write_xml_stream()
Note that stream gets closed, use pcmk__str_empty(), log XML at info
level, note what bzWriteOpen() params mean, check BZ return codes where
appropriate, close BZFILE on error, use %u for formatting unsigned int.
For bzWriteOpen(), the default workFactor is 30. Instead of using this
magic number, we now use 0, which means "use the default value."
The block size ranges from 1 to 9, and there's no default value.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>