lib: add tst_is_virt()

The initial version supports only generic check for xen dom0/domU,
but should allow to easily extend it for other types of checks,
(e.g. KVM guest) if needed later.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
getrusage04: skip it on Xen

Skip this test on Xen, as it is known to fail, presumably because
Xen is not able to account virtual CPU time with same accuracy
as on the real CPU.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>