Consolidate the libvirt XML serial code.
Consolidate the libvirt XML serial code.

There were two places that we doing essentially the same
thing; consolidate them here.

Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@gmail.com>

moofrank/oz,cernops/oz,moofrank/oz,mgagne/oz,clalancette/oz,clalancette/oz,imcleod/oz,ndonegan/oz,nullr0ute/oz,nullr0ute/oz,NeilBryant/oz,ndonegan/oz,NeilBryant/oz,cernops/oz,mgagne/oz,imcleod/oz