add stopping criteria
stagnation and max iteration count
Authored by: thibautd 2015-02-12
Parent: [r32121]
Child: [r32123]