Refactor `io` package

There's probably a lot more refactoring necessary, but this change-set was getting a bit long.

This cleans up a lot of the io and plugin infrastructure ~~and adds some flexibility in specifying image-type specific plugins (see `inherited_config`).~~ I wouldn't be surprised if some un-tested portions of the original infrastructure were broken. Please tell me where things break (or better yet, write a test for it).

~~The current image-type-specific plugin handling is broken because I'm using file extensions, which won't work so great in general ('.tif'/'.tiff', '.jpg'/'.JPG'/'.jpeg' would map to different plugins). I'd like to use some combined approach with `imghdr` and file extensions, but that's not ready yet.~~ (removed for a later PR).