Support corner cases in GridComparator (almost)
Raise an error when image size not divisible by cell size

Keep GridComparator simple for now.