fftrees_ranktrees ranks trees in an FFTrees object x
based on the current goal (either "cost" or as specified in x$params$goal).
fftrees_ranktrees is called by the main FFTrees function
when creating FFTs from and applying them to (training) data.
See also
FFTrees for creating FFTs from and applying them to data.
