snapshot: Refactor virDomainSnapshotDefFormat
snapshot: Refactor virDomainSnapshotDefFormat

Split out an internal helper that produces format into a
virBuffer, similar to what domain_conf.c does, and making
the next patch easier to write.

Signed-off-by: Eric Blake <a9da18479c871fe903d9590822cfe2629c6a4d11@redhat.com>
Reviewed-by: John Ferlan <87558058f6f829e5ec976c8ef960720af4ff9c7d@redhat.com>

libvirt/libvirt,andreabolognani/libvirt,olafhering/libvirt,jardasgit/libvirt,eskultety/libvirt,nertpinx/libvirt,olafhering/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,zippy2/libvirt,crobinso/libvirt,eskultety/libvirt,nertpinx/libvirt,jardasgit/libvirt,libvirt/libvirt,libvirt/libvirt,olafhering/libvirt,jfehlig/libvirt,jardasgit/libvirt,olafhering/libvirt,fabianfreyer/libvirt,eskultety/libvirt,andreabolognani/libvirt,nertpinx/libvirt,crobinso/libvirt,zippy2/libvirt,jfehlig/libvirt,andreabolognani/libvirt,jfehlig/libvirt,jardasgit/libvirt,crobinso/libvirt,nertpinx/libvirt,zippy2/libvirt,eskultety/libvirt,eskultety/libvirt,crobinso/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,libvirt/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,zippy2/libvirt