PERF: better perf on min/max/resample when on indices not containing NaT for DatetimeIndex/PeriodIndex (GH7633)