SpatialGrid: simplified coordToMatrixIndices().
GridNeighborCache: fix