[New gallery] ignore perrow option in this mode, as doesn't make sense.

gallery in packed resizes images to have same height. Since the images
have dynamic height, its impossible to implement the perrow option
using a width: css rule.

Also fixes the option for the nolines mode, where it calculated
the row length wrong.

Change-Id: I99018e258d3eea93c8203cb0b6bb63bfed1c00b7
Merge "[New gallery] ignore perrow option in this mode, as doesn't make sense."