Improved flexibility of ImageIOTest

Created a templated method chain that allows type narrowing of the pixel
type and dimension. It also allows for RGB pixel types to be requested.

The repeated typedef method seemed to not work as intended. This should
be more correct.