tests: Remove a potential race from test-thread
A g_usleep() was introduced in commit
e22ecb19662970a42def6df74db6359e58084727 to fix a potential race where
the non-main threads would finish all their work before the error_loop
was started, leaving the error_loop to run for 30s then abort the test.
A better fix, instead of doing a racy sleep, is to have the non-main
threads spin until the error_loop is running. GLib takes care of all the
locking for us, and since we don’t care about efficiency for test cases,
spinning is fine (the wait is also going to be quite short).