move atexit(term_exit) and O_NONBLOCK to qemu_chr_open_stdio