Fix deep recursion.
fixes https://github.com/official-stockfish/Stockfish/issues/7156
The issue is caused by LMR using negative reductions (i.e. extensions) in an uninterrupted chain ultimately extending to MAX_PLY. This patch fixes it by not allowing for such extensions once one is sufficiently deep in the search tree (twice rootDepth).
passed STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 154752 W: 39489 L: 39403 D: 75860
Ptnml(0-2): 222, 17300, 42226, 17426, 202
https://tests.stockfishchess.org/tests/view/6aa4559ba8284b37a0a058c4
passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 55782 W: 14432 L: 14254 D: 27096
Ptnml(0-2): 11, 5664, 16367, 5834, 15
https://tests.stockfishchess.org/tests/view/6aa772a1a8284b37a0a05cb9
closes https://github.com/official-stockfish/Stockfish/pull/7170
Bench: 1660220