Merge pull request #1934 from rbian/utils_misc

virttest.utils_misc: Add some code for strip_console_codes
Merge https://github.com/zhanghrp/virt-test

utils_libguestfs: Add functions set_direct and get_direct