Fix tests for Hamamatsu VMS
JPEGTurboService: speed up finding of restart markers

This makes tile reading faster for files where we don't have the restart
marker list in advance (e.g. Hamamatsu VMS).
Hamamatsu VMS: final bug fixes and performance improvements