This is so that PNGs can be written to memory, not just to an external file. stdio's FILE cannot be easily redirected but a C++ class can.
The writer is very simple and primitive right now, allowing no seeking, but for the job at hand it is sufficient.
Note that large parts of savegame creation have been disabled, because they are about to be rewritten and it makes no sense to adjust them all before.
- some reorganization of texture precaching so that the renderer can decide what to do with actors.
Just marking the sprite textures loses too much info if more is needed than just loading the images into memory.