improve memory usage of grid.center_coords

rather than a single vector operation using `4 * m x n` space, goes row-wise to
use `2 * (m+1) x n`

since grids are entirely in-memory, this is a substantial savings. Still,
calling center_coords should probably be avoided since it has to use at least
double again the space of the grid.