OPT: changes in the LOOCV function, small changes elsewhere
OPT: changes in the LOOCV function, small changes elsewhere

Former-commit-id: 2a894cdc1604a8d8711a69d92524acbfd98bdfce
Former-commit-id: fc8b898878e83374fa8603e8fb09933f137b5612
3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox