tile min/max green calc, tile output

Use Ingo Weyrich's idea of a per-tile min/max green buffer, rather
than storing min/max in g1/g3 of intermediate image array. This allows
the intermediate array to be only 3 rather than 4 channels, reducing
memory consumption. This means no need to access the intermediate
image buffer during the rest of the tile processing, as the rgb[0]
buffer has the same data. Furthermore, write processed data directly
to the out[] buffer when have finished each tile, which saves a final
copy loop and gives an approx. 20% speedup.