Cleanup and optimizations in JPEG module, some headway with restarts; turned second return value of BitReader() into a slightly more general miscellaneous ops routine, used to handle the end of the scan more intelligently