fn skip_segment(bytes: &[u8], pos: usize, end: usize) -> Option<usize>
Read and skip a variable-length JPEG segment. Returns the position after the segment, or None if the segment is malformed.