Use QThreadPool for threading

This replaces our custom threading code with QThreadPool/QRunnable. A nice thing about QThreadPool is that it uses an ideal thread count for the system, and takes care of queuing etc. I'm not sure if there's a reason these weren't used before, so maybe this patch has problems that I'm unaware of. I haven't noticed any dip in performance. More testing is needed.