glib: Add casts from size_t to gsize

This unbreaks cross compile builds:

configure --target-list="i386-softmmu" --cpu=i386

When building on a 64bit machine.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
qemu-char: Workaround for no g_timout_add_seconds

This function does not exist until glib version 2.14. Workaround.

Suggested-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>