virttest.utils_libguestfs: Enhancements of virt_edit interface.

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