Reduce the complexity of the Makefile.am by just defining LDADD for all
the tests.
Use the built-in functionality of wait conditions to determine whether
the queue is empty.
Add a (failing) test for the threadpool as a whole.
Cancel threads more thoroughly.