added user control of MaxIter stopping criteria and of function tolerance for TolHistFun stopping criteria