[libvirt] [PATCH 3/5] factor common code in virHashAddEntry and virHashUpdateEntry