fixed concurrent training bug: now uses 1 thread if has less than
numCalcThreads training documents.