Added an option to traincascade program to select the maximum number of threads to use during training
Merge pull request #2999 from jpuigcerver:traincascade_choose_threads