rename enum io_mode -> io_mode_t; make io_data_t::io_mode that type
Use new IO_INVALID as default value of io_data_t::io_mode
Make io_data_t destructor virtual
Introduce a macro CAST_INIT to abbreviate common static_cast's a bit

This macro doesn't work with type names containing commas, but that doesn't
seem to be too common in fish.
Let io_data_t constructor take optional io_mode and fd
Put io_data_t detail printing in virtual io_data_t::print
parser.cpp: Put off initialization of new_io until mode is known
Split out io_close_t
Split out io_fd_t
Split out io_file_t
Split out io_buffer_t, make input_redirect in exec() a raw pointer
Convert io_buffer_destroy to ~io_buffer_t
Convert io_buffer_create to static io_buffer_t::create, make io_buffer_t constructor private
Add missing virtual qualifier to ~io_buffer_t
Convert io_buffer_read to io_buffer_t::read
Split out io_pipe_t, let io_buffer_t inherit it
Make io_data_t pure virtual, its constructor protected
Make io_buffer_t::out_buffer a raw pointer, initialize in io_buffer_t's constructor
Make is_input a member of io_pipe_t
Make io_data_t::io_mode const

A protected constructor is needed in io_pipe_t to let io_buffer_t override
its io_mode.