Fixing a common/combined Apache log

I was trying another web server statistics package, awstats, based on a testimonial in Alan’s blog. Unfortunately, awstats expects a log file to be in the “combined” log format, and has many entries in the default “common” format (prior to a switch for superior logging). A search showed no obvious small script for this, so I hope that providing will save someone a few minutes or, at least, a few thousand log entries.