virt: Record git HEAD commit id if possible

Hope this commit id could help when debuging virt-test bugs.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>