TIFF: adjust optimal tile height if tiles have height 1

This prevents callers that rely on the optimal tile height from reading
one row at a time from small images.  If the images are sufficiently
wide that only 1 row of pixels will fit in memory, then the optimal
height will still be 1.

Fixes #11850.
Merge pull request #1029 from melissalinkert/rebased/develop/11850

TIFF: adjust optimal tile height if tiles have height of 1 (rebased onto develop)