Make predict use a thread pool
Created by: aroffringa
Predicting multiple directions is currently really slow because it uses a nested OpenMP for loop over i) direction; and ii) sources. When more than one direction is used, the second loop doesn't get multi-threaded anymore. In my case, I have 3 directions with ~100, 100 and 2000 sources, and because of this I have to wait forever. It's not hard to implement a parallel for loop with a thread pool, which would be the best approach with all combinations of directions/sources.