[libvirt] [PATCH] hash: add common utility functions