vm: fix 'port' reporting with SSL enabled

If spice is configured with ssl enabled, the 'port' attribute
may be missing. This patch fixes that.

The port allocation behaviour in libvirtt may be surprising. If we supply

    <graphics autoport="yes" keymap="en-us" passwd="*****"
passwdValidTo="1970-01-01T00:00:01" port="-1" tlsPort="-1" type="spice">
        <channel mode="secure" name="main"/>
        <channel mode="secure" name="inputs"/>
        <channel mode="secure" name="cursor"/>
        <channel mode="secure" name="playback"/>
        <channel mode="secure" name="record"/>
        <channel mode="secure" name="display"/>
        <channel mode="secure" name="usbredir"/>
        <channel mode="secure" name="smartcard"/>
        <listen type='address' address='127.0.0.1'/>
    </graphics>

note port=1 and tlsPort=-1 in input
we will get in output

    <graphics type='spice' tlsPort='5900' autoport='yes'
listen='127.0.0.1' keymap='en-us' passwdValidTo='1970-01-01T00:00:01'>
      <listen type='address' address='127.0.0.1'/>
      <channel name='main' mode='secure'/>
      <channel name='display' mode='secure'/>
      <channel name='inputs' mode='secure'/>
      <channel name='cursor' mode='secure'/>
      <channel name='playback' mode='secure'/>
      <channel name='record' mode='secure'/>
      <channel name='smartcard' mode='secure'/>
      <channel name='usbredir' mode='secure'/>
    </graphics>

note no 'port' in output

However, if we do not specify the channels in input

    <graphics type='spice' port='-1' autoport='yes' listen='127.0.0.1'>
    </graphics>

We will get 'port' in output in addition to 'tlsPort', which was
expected.

    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>

Change-Id: If0cfab79f8f353957a43dd7f4bf908a51a5dca57
Bug-Url: https://bugzilla.redhat.com/1099425
Signed-off-by: Francesco Romani <fromani@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/27924
Tested-by: Sandro Bonazzola <sbonazzo@redhat.com>
Reviewed-by: Antoni Segura Puimedon <asegurap@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>