virttest.libvirt_vm: Add function to get job's type.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>