Avoid using tor_assert before the logging system is fully initialised
In #18241 (moved), we discovered that an assertion failure that occurs before or during the initialisation of the logging system causes an infinite loop.
We need to check tor and the tools for these kinds of issues.
In particular, the logging system initialises the log mutex. tor_mutex_init() can still call tor_assert if it fails, so the possibility of this stack overflow still exists when we're initialising the log mutex itself.
Now these kinds of failures don't happen very often, and if they do, it's unlikely tor would ever launch. But it would be better to use
fprintf(stderr, ...); in these circumstances so that users can see the actual log message.