tls: make tls-certfile test a bit less wild
tls: make tls-certfile test a bit less wild

While inspecting this test for an unrelated issue it became clear that
the testcase is capable of spawning an unbounded number of threads
(owing to the async thread shutdown in the main loop of the program).

Let's switch to explicitly joining the threads in order to keep things a
bit better under control.

Fixes #13259
Closes #13260
moraleslazaro/cockpit,cockpituous/cockpit,martinpitt/cockpit,mvollmer/cockpit,cockpit-project/cockpit,moraleslazaro/cockpit,deryni/cockpit,mvollmer/cockpit,garrett/cockpit,deryni/cockpit,deryni/cockpit,deryni/cockpit,cockpituous/cockpit,cockpit-project/cockpit,cockpituous/cockpit,moraleslazaro/cockpit,moraleslazaro/cockpit,cockpit-project/cockpit,martinpitt/cockpit,cockpit-project/cockpit,cockpituous/cockpit,moraleslazaro/cockpit,moraleslazaro/cockpit,mvollmer/cockpit,cockpituous/cockpit,martinpitt/cockpit,garrett/cockpit,garrett/cockpit,martinpitt/cockpit,mvollmer/cockpit,cockpituous/cockpit,mvollmer/cockpit,deryni/cockpit,moraleslazaro/cockpit,martinpitt/cockpit,cockpit-project/cockpit,deryni/cockpit,garrett/cockpit,garrett/cockpit,deryni/cockpit