Call cycle detection before qsearch()
This has the property of raising alpha before calling qsearch(), thus
maybe giving some more cuts during qsearch(). The patch is equivalent
to the use of cycle detection inside qsearch() at depth 0, but is in
fact implemented by re-ordering code inside search(), which explains
the [0..4] bounds in the following tests.
STC (interrupted after 124250 games, with LLR=0.87):
http://tests.stockfishchess.org/tests/view/5b1500bd0ebc5902a8b420bf
LLR: 0.87 (-2.94,2.94) [0.00,4.00]
Total: 124250 W: 24973 L: 24470 D: 74807
LTC:
http://tests.stockfishchess.org/tests/view/5b1590eb0ebc5902a84dcd09
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 74234 W: 11098 L: 10733 D: 52403
Closes https://github.com/official-stockfish/Stockfish/pull/1635
Bench: 4326784