select_thread_for_work must check for works, not messages

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>
initial code for the hash table (not tested)

Link: https://github.com/GeneAssembly/biosal/issues/38
Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>