The qemu seabios firmware disables serial console line wrapping. Let's make sure we re-enable it again when we reset a terminal to some sane defaults. To avoid potentially blocking on writing to the terminal, we put it in nonblocking mode and add a timeout of 50ms.