cutils: Improve qemu_strtosz handling of fractions