fftrees_cuerank function

Calculate thresholds that optimize some statistic (goal) for cues in data