Summary: Thread pool had the same bug as scheduler before, missing condition variable notifications because of not holding lock while emitting notification.
Reviewers: teon.banek, buda
Reviewed By: teon.banek
Differential Revision: https://phabricator.memgraph.io/D347