Native thread fixes
pthread_create's return value was ignored, so a failed spawn left the engine hanging forever waiting for a searching flag no thread would clear. Report the error and exit. Avoid using std::thread. Intends to consolidate #7060 and #7065 by making `NativeThread` more customizable.
closes https://github.com/official-stockfish/Stockfish/pull/7072
No functional change
Co-authored-by: Timothy Herchen <timothy.herchen@gmail.com>
Co-authored-by: ppigazzini <pasquale.pigazzini@gmail.com>