fn skip_or_accept(bytes: &[u8], pos: usize) -> Option<usize>
Skip a variable-length JPEG segment, or return None when the segment is malformed (signals the caller to accept the whole remaining buffer).