JPEG: add autodetection of bitmasks that are msb ordered. The JPEG_MASK_BIT_ORDER config option can also be set to MSB if the heuristics fails. (#5102)

git-svn-id: https://svn.osgeo.org/gdal/trunk@26063 f0d54148-0727-0410-94bb-9a71ac55c965