Invalidate only when shader is different

I don't think this will improve anything, since setThumbnailBitmap is
called when binding the data and once afterwards if there is a
thumbnail.
Invalidate only thumbnail region

The code invalidated the entire view when setting a thumbnail. Change it
to only invalidate the thumbnail region to draw less while thumbnails
load as the user is scrolling.

Also fix a bug where the thumbnails weren't scaling properly. Make
thumbnails scale completely to the square even if they don't have the
height to do so. They look a bit stretched sometimes, but I think the
overall appearance of a full thumbnail looks better...