[libvirt] [PATCH v5 6/7] util: Add helpers for safe domain console operations