gltfpack: Implement JPEG header decoding
gltfpack: Implement JPEG header decoding

This follows the JPEG structure description from Wikipedia, parsing the
frame structure until Start Of Frame.

Also fix PNG decoding for some image sizes (char is signed, and we can't
cast it directly to unsigned int).

zeux/meshoptimizer,zeux/meshoptimizer,zeux/meshoptimizer