By moving the 'StartIndexes()' call into the 'initload'
thread, we can remove the threads active wait. Optimizing
the available resources.
The only difference with the current state is that now the
indexes threads will only be started when they can process
work and not before it.
This is a partial backport of core#27607
https://github.com/bitcoin/bitcoin/pull/27607/commits/fcbdaeef4d5a63e3e5b479c6fcad730eb86fb923
Depends on D17748
Notes:
- we diverge from the source material in init.cpp because of missing backports (core#27861 and ancestors) that are intentionally skipped because they depends on the multiprocessing project (a very large project). This affects a single line, and a TODO has been added to explain the divergence.
- the test changes in feature_index_prune.py are applicable in the next commit, in this commit they would break the tests