added new EarlyStoppingListener.java for early stopping of the training