added maxiteration to BatchTrainer and ParallelBatchTrainer

default value is -1 which means "no limit" which means iterate until
optimizer detects convergence