LibGfx/JPEG: Simplify some loops

There's no reason for these loops to run backwards.

No behavior change.