Simplify TT interface and avoid changing TT info
This commit builds on the work and ideas of #5345, #5348, and #5364.
Place as much as possible of the TT implementation in tt.cpp, rather than in the
header. Some commentary is added to better document the public interface.
Fix the search read-TT races, or at least contain them to within TT methods only.
Passed SMP STC: https://tests.stockfishchess.org/tests/view/666134ab91e372763104b443
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 512552 W: 132387 L: 132676 D: 247489
Ptnml(0-2): 469, 58429, 138771, 58136, 471
The unmerged version has bench identical to the other PR (see also #5348) and
therefore those same-functionality tests:
SMP LTC: https://tests.stockfishchess.org/tests/view/665c7021fd45fb0f907c214a
SMP LTC: https://tests.stockfishchess.org/tests/view/665d28a7fd45fb0f907c5495
closes https://github.com/official-stockfish/Stockfish/pull/5369
bench 1205675