Improve the dumping of debug logs from daemons.
bz 317181
group_tool reads debug logs from groupd, fenced, and gfs_controld.
The dumping code in all three daemons is now identical. The other
change is that the dumping function terminates the final write
with \0, and no longer sends the entire 1MB log buffer if it's not full.
(Plus a couple random bits to sync with HEAD)