Require explicit seeds for `Simulation` and `SimulatedEnvironment` to
ensure reproducible test results.
Also:
- Drop packets in `FakeUdpSocket` when the receive queue is full to
prevent unbounded memory growth during stress tests.
- Improve synchronization in `Simulation::run_until` by adding a timeout
to the barrier wait, preventing hangs if a runner is unregistered.
Introduces a new testing support library 'testing/support' that provides
a clean, modular, and fully deterministic environment for testing
toxcore components.
It makes no sense to include it in the public API as clients can't make
any meaningful use of it via public API, it can only be used if one also
includes other internal/private headers that we don't install.
It's used only in the testing code, which has access to the internal
headers.
Fixes#2739, at least to some degree. I decided against moving things to
a separate `tox_testing.h` and leaving only things in `tox_private.h`
that we are fine with clients using, as otherwise `tox_lock()` /
`tox_unlock()` would have to be moved out of `tox_private.h` to
somewhere else, but `tox_private.h` actually sounds like the right place
for them, naming-wise. So perhaps it's fine if we have things in
`tox_private.h` that we don't want clients to use.