shared.scripts: Make virtio_console_guest can save the data transfered to a file

Save the data transfered to a file. This can help furthur data check in virtio
serial test case.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.scripts: Bug fix in function recv for windows guests

Should add the _data to recvs otherwise the while loop will not end up.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.scripts: virtio_console_guest should write different string in loop

When we write data to virtio ports, we should start from the place that
not transfered yet.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.scripts: Update send() in virtio_console_guest for Windows

As in Windows guest send big data directly will cause an OS leak resource
problem. When sending data bigger than 4096, cut it to pieces which is smaller
than 4096 then send them one by one.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.scripts: Add clean_port for Windows guest in virtio_console_guest

For Windows guest just read all data from serial port when try to clean the port.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: Add a virtio serial file transfer case

Virtio serial file transfer case:
 - transfer data from guest to host for 600s
 - check the data send from guest to host is correct
 - transfer data from host to guest for 600s
 - check the data send from host to guest is correct

Signed-off-by: Yiqiao Pu <ypu@redhat.com>