virttest.utils_test.libvirt: add new test utilities

Remote access libvirtd will use these 2 new functions, and other test cases also probably reuse them, so move these 2 functions from test cases to virttest/utils_test/libvirt.py.

It seems that virsh.VirshSession does same job as this function.
Have I missed something?