virPerfEventIsEnabled: Accept NULL @perf
virPerfEventIsEnabled: Accept NULL @perf

After bdcf6e481 there is a crasher in libvirt. The commit assumes
that priv->perf is always set. That is not true. For inactive
domains, the priv->perf is not allocated as it is set in
qemuProcessLaunch(). Now, usually we differentiate between
accesses to inactive and active definition and it works just
fine. Except for 'domstats'. There priv->perf is accessed without
prior check for domain inactivity. While we could check for that,
more robust solution is to make virPerfEventIsEnabled() accept
NULL.

How to reproduce:
1) ensure you have at least one inactive domain
2) virsh domstats

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Daniel P. Berrange <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

VenkatDatta/libvirt,datto/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,jardasgit/libvirt,olafhering/libvirt,jfehlig/libvirt,olafhering/libvirt,libvirt/libvirt,andreabolognani/libvirt,eskultety/libvirt,libvirt/libvirt,zippy2/libvirt,fabianfreyer/libvirt,eskultety/libvirt,jardasgit/libvirt,eskultety/libvirt,datto/libvirt,libvirt/libvirt,eskultety/libvirt,libvirt/libvirt,VenkatDatta/libvirt,datto/libvirt,nertpinx/libvirt,nertpinx/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,jardasgit/libvirt,datto/libvirt,nertpinx/libvirt,olafhering/libvirt,crobinso/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,zippy2/libvirt,olafhering/libvirt,crobinso/libvirt,andreabolognani/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,jfehlig/libvirt,zippy2/libvirt,eskultety/libvirt,jfehlig/libvirt,datto/libvirt,jardasgit/libvirt,crobinso/libvirt,zippy2/libvirt,crobinso/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,fabianfreyer/libvirt