Some simple refactoring of virt-resize.
I originally had the idea that we could turn virt-resize into a
library (cf. virt-customize) and use it from virt-builder, but I now
don't think that would make any meaningful difference. In particular
we'd still have to open the handle the same number of times.
These two patches are left over from my work on that.
Rich.