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

Also reverted addition of thrust/extrema.h include.