Split io_data_t

It's not quite finished, but I think the branch has accumulated enough commits for a review.