Make JPEG parsing a lot more resilient: skip all bytes between the end of a segment and the next 0xFF followed by non-0xFF. Add a thorough test for this. Fixes one of the problems with SANSELAN-13. JIRA-Key: SANSELAN-13