Optimize attackers_to()
https://tests.stockfishchess.org/tests/view/6782decb6ddf09c0b4b6e1b0
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 105920 W: 27571 L: 27181 D: 51168
Ptnml(0-2): 284, 10808, 30403, 11164, 301
- If we only need to know if attackers exist we can skip some
calculations.
- Also calculating slider/magic attackers first is better because the
double lookup is slow due to memory latency.
- I also included a couple of very minor cleanups in search that
probably don't warrant their own PR but I can open separately if
that's better.
closes https://github.com/official-stockfish/Stockfish/pull/5762
No functional change