app: add gimp_grid_get_spacing() and gimp_grid_get_offset()

and do the rounding to integer there instead of in several places.