[RFC] Bug report generating script

Hi, there,
This pullreq is about to implement a bug report generation mechanism. It makes virt-test create a bug report template when meeting 'TestFail' exception.

You can simply set the 'generate_bug_report' to 'yes' to enable this function.
I did some simple test with a modified boot.py script, this function takes less than 1 second (6.65s vs 7.22s) to do the generation action.

The bug report is put together with the debug logs, named "bug_report.txt". And this report looks like:
```
# more logs/run-2013-05-13-14.18.23/qcow2.virtio_blk.smp2.rtl8139.Fedora.18.x86_64.boot/bug_report.txt 
Description of problem:

Version-Release number of selected component (if applicable):
# rpm -qa | grep '^kernel\|qemu\|seabios\|virtio\|pxe\|vgabios\|spice' | sort
ipxe-roms-qemu-20130103-1.git717279a.fc19.noarch
kernel-3.9.0-0.rc1.git0.1.fc19.x86_64
kernel-3.9.0-0.rc8.git0.1.fc20.x86_64
kernel-debuginfo-3.9.0-0.rc8.git0.1.fc20.x86_64
kernel-debuginfo-common-x86_64-3.9.0-0.rc8.git0.1.fc20.x86_64
kernel-headers-3.9.0-0.rc8.git0.1.fc20.x86_64
kernel-tools-3.9.0-0.rc8.git0.1.fc20.x86_64
kernel-tools-libs-3.9.0-0.rc8.git0.1.fc20.x86_64
libvirt-daemon-driver-qemu-1.0.4-1.fc20.x86_64
qemu-common-1.4.1-1.fc20.x86_64
qemu-img-1.4.1-1.fc20.x86_64
qemu-kvm-1.4.1-1.fc20.x86_64
qemu-system-x86-1.4.1-1.fc20.x86_64
seabios-bin-1.7.2-0.1.gita810e4e7.fc19.noarch
seabios-bin-1.7.2-1.fc19.noarch
seavgabios-bin-1.7.2-1.fc19.noarch
spice-glib-0.19-1.fc20.x86_64
spice-gtk-0.19-1.fc20.x86_64
spice-gtk3-0.19-1.fc20.x86_64
spice-gtk-tools-0.19-1.fc20.x86_64
spice-protocol-0.12.5-1.fc19.noarch
spice-server-0.12.2-5.fc20.x86_64
spice-server-devel-0.12.2-5.fc20.x86_64
spice-vdagent-0.14.0-1.fc20.x86_64
vgabios-0.6c-9.fc19.noarch

Running Kernel:
3.9.0-0.rc8.git0.1.fc20.x86_64


Host kernel cli:
BOOT_IMAGE=/vmlinuz-3.9.0-0.rc8.git0.1.fc20.x86_64 root=/dev/mapper/vg_none-lv_root ro rd.md=0 rd.lvm.lv=vg_none/lv_swap rd.dm=0 SYSFONT=True KEYTABLE=us rd.lvm.lv=vg_none/lv_root rd.luks=0 LANG=en_US.UTF-8 rhgb
 quiet

How reproducible:

Steps to Reproduce:
 Try to log into guest.
 1
 2
 3
 4
 5

Actual results:

Expected results:

Additional info:

Qemu CLI:
    -S \
    -name 'virt-tests-vm1' \
    -chardev socket,id=qmp_id_qmp1,path=/tmp/monitor-qmp1-20130513-141823-GM7hiN0O,server,nowait \
    -mon chardev=qmp_id_qmp1,mode=control \
    -chardev socket,id=serial_id_serial1,path=/tmp/serial-serial1-20130513-141823-GM7hiN0O,server,nowait \
    -device isa-serial,chardev=serial_id_serial1 \
    -chardev socket,id=seabioslog_id_20130513-141823-GM7hiN0O,path=/tmp/seabios-20130513-141823-GM7hiN0O,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20130513-141823-GM7hiN0O,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -drive file='/home/virt-test-upstream/shared/data/images/f18-64.qcow2',if=none,id=drive-virtio-disk1,media=disk,format=qcow2,aio=native \
    -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,bootindex=0 \
    -device rtl8139,netdev=idJVfRjm,mac='9a:2b:2c:2d:2e:2f',bus=pci.0,addr=0x6,id='id4QPpzY' \
    -netdev tap,id=idJVfRjm,fd=10 \
    -m 1024 \
    -smp 2,maxcpus=2,cores=1,threads=1,sockets=2 \
    -cpu 'Penryn' \
    -M pc \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -vnc :0 \
    -vga std \
    -rtc base=utc,clock=host,driftfix=none  \
    -boot order=cdn,once=c,menu=off  \
    -enable-kvm

Qemu output:




# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 23
Model name:            Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz
Stepping:              10
CPU MHz:               2000.000
BogoMIPS:              5319.79
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              3072K
NUMA node0 CPU(s):     0-3
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf
 pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriority

```