Fix IFF output so that it accepts write_scanline, even though IFF is tile only

Fixes #794

This is in a similar spirit as #800, where we made the scanline-only file format writers accept API input *as if* it were tiled, but it just buffers until the image is complete and then output scanlines.

In this case, we have ONE format -- it's the only one I know of -- that is tile only, so this change makes it accept write_scanline calls, buffering the output, then writing the tiles at the end. 

This makes the IFF output a lot less finicky (not that IFF is especially needed these days, but...).

There is some minor reformatting in here, too, for things I saw that were outside our usual style.