[cmake] Link with pthreads
Summary: Since the removal of Boost::thread, there is no more explicit pthread linkage when jemalloc is not used, which is causing weird bugs on some Linux flavors (seen on Ubuntu 20.04, but there might be others).
Test Plan:
With Ubuntu 20.04:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Differential Revision: https://reviews.bitcoinabc.org/D14095