Set rest_total_hits_as_int in search requests only on the new cluster, the old cluster can be on a version older than don't support this parameter (< 6.6) and total hits is not an object in 6x anyway. Closes #36291