add SDL_SavePNG, write files as png if possible, unless ending .bmp

This commit adds a "minimal interface to lib png to support writing
png files from SDL surfaces", to the codebase. It adds a save_image
function to namespace image, and this checks compiler flags to see
if lib png is available. The function will save as a png if png
support is included and save file name doesn't have bmp extension,
and otherwise it will save as a BMP as usual.

This makes sense because the whole project is based on png files,
we'd rather save as png unless we can't or the user actually wants a
bmp.

PNG saving is better because SDL doesn't support saving the alpha
channel of sprites to bmp files, whereas this PNG saving code does
support the alpha channel.

We already had lib png as a dependency to build the tools, just not
the main game. This commit changes cmake and scons but makes the
dependency only optional, changing nothing if lib png is not
available.

See here: https://github.com/driedfruit/SDL_SavePNG