Add early stopping criteria to enable setting maximum tree depth.