Replace remaining non-test use of std::min

Replace remaining non-test use of std::min with thrust::min in max_grid_size