Add missing include <thread>

Otherwise, gcc thinks this_thread is coming from std instead of thread
1 job for master in 4 minutes and 47 seconds (queued for 2 seconds)
Status Name Job ID Coverage
  Build
passed linux kf5-qt5 qt5.15 #106813

00:04:47

4.0%