d3dretrace: Simplify duplicate code.
image: Support stripping alpha channel when writing PNG images.
gl/d3dretrace: Strip alpha channel when writing PNG images.

The alpha channel is too often bogus, with widespread transparency
preventing viewing the RGB channels.