TIFF: fix tile reading when the tile overlap is non-zero

Fixes #10356.
Trestle: correctly set the resolution count
Trestle: only set the resolution count if resolutions are unflattened
Trestle: fix openBytes' behavior when resolutions are unflattened
Trestle: one more fix for unflattened resolutions
Trestle: only parse mask data for non-OME-XML stores
Add missing import
Add a few comments explaining the overlap calculations
Merge pull request #398 from melissalinkert/trestle-fixes

Trestle fixes