[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.