Add API to set `ImageReader` format by extension to support hooks
Right now, plugin decoders can only be used when decoding a file. It's impossible to use them to decode arbitrary BufRead+Seek data. This is because hooks are currently only used by ImageReader and the only way to set its internal format to an extension is via ImageReader::open(&Path).
This PR solves this API limitation by adding a new set_format_with_extension method, which sets the internal format to the given extension string.
Bike shedding: I'm not sure about the name. Other options I've considered: set_format_from_extension, set_format_by_extension, set_extension.
Related to #2616
Another option is to use with_format/set_format and rename the existing methods:
with_format->with_builtin_formatset_format->set_builtin_format
Not entirely sure how I feel about that though, since it would add a bit more churn