Optimize the huffman coding of the jpegs

This should improve the size of jpegs by a few percent. Note: we should possibly consider using progressive jpegs for an additional size improvement.