Provide optimize_media_images command

This command offers a simple way to process jpegs and pngs stored
within the media root folder with optipng and jpegoptim.

Optionally, this can be limited to thumbnails and the state can
be stored to prevent double processing of the relevant files.