lstmtraining: Fix handling of --max_iterations
lstmtraining: Fix handling of --max_iterations

The iteration counter should be checked for each iteration,
not only at the end of a batch.

Signed-off-by: Stefan Weil <8d4c780fcfdc41841e5070f4c43da8958ba6aec0@weilnetz.de>

stweil/tesseract,amitdo/tesseract,amitdo/tesseract,UB-Mannheim/tesseract,UB-Mannheim/tesseract,tesseract-ocr/tesseract,tesseract-ocr/tesseract,UB-Mannheim/tesseract,amitdo/tesseract,stweil/tesseract,stweil/tesseract,tesseract-ocr/tesseract,jbarlow83/tesseract,tesseract-ocr/tesseract,tesseract-ocr/tesseract,amitdo/tesseract,jbarlow83/tesseract,jbarlow83/tesseract,jbarlow83/tesseract,jbarlow83/tesseract,UB-Mannheim/tesseract,UB-Mannheim/tesseract,stweil/tesseract,amitdo/tesseract,stweil/tesseract