ccan/io: handle errors on poll()