ccan/io: save errno on io_close, for finish functions.