Correctly compute and use newMinIdx when autotuning
Correctly compute and use newMinIdx when autotuning

Previously, we were taking the `maxinum` of `tMin` which is a threshold value,
and `newMinIdx` which is an index into an array of threshold values.

diku-dk/futhark,HIPERFIT/futhark,HIPERFIT/futhark,diku-dk/futhark,diku-dk/futhark,HIPERFIT/futhark,diku-dk/futhark,diku-dk/futhark