Reduce memory footprint when the output image is not streamable
I propose to implement something in the ImageFileWriter to reduce the memory footprint when the output image is not streamable (e.g. when output raster is JPEG2000 or COG (see investigations with GDALImageIO in #2309)).
Indeed when the output format CanStreamWrite is False, the whole image is generated once, without streaming.
The downside is that every pipeline block is triggered over the LargestPossibleRegion, which may require a lot of memory, especially when the pipeline has many blocks (or greedy ones!).
A simple enhancement could consist in using an in-memory image object, fully allocated, that is updated with an explicit streaming mechanism that uses the original m_StreamingManager parameters.
Of course sometimes we want to keep the original behavior (default).