Make last row of new gallery not be huge.

If we cannot make the last row fit the page width,
make the image zoom factor be the average zoom
factor (sans any shrinking) so that the last
row doesn't have images that are super huge.

Change-Id: I0caf8d1800808f14c9f53073f3b901eedec32bb7
Merge "Make last row of new gallery not be huge."