chardev: fix qemu_chr_open_fd() with fd_in==fd_out