virt: stats: move vm status detection in a method

this patch moves the detection of the status of a VM
in a separate method. No functional changes.

Change-Id: Id6ae78540b0608ceaa092b142afd1f6ab4df19fe
Signed-off-by: Francesco Romani <fromani@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/26549
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-by: Vinzenz Feenstra <vfeenstr@redhat.com>