examples: Check for domain status properly
examples: Check for domain status properly

In the index.php a list of VMs is printed and if the domain is
alive it's screenshot is taken and placed next to its name.
However, the aliveness check is written poorly. Firstly, it's
accessing $dom as if it were an associative array (which is not,
it's an resource), secondly it's assuming only VIR_DOMAIN_RUNNING
domains can have a screenshot taken. Switch to domain_is_active()
which is what libvirt does too under the hood.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

libvirt/libvirt-php,libvirt/libvirt-php,libvirt/libvirt-php