Implements the change proposed in #193 (closed).
The stats are now computed when requested by the used using a threadpoolized loop over the particles. This happens rarely and is hence not a burden on the whole system any more. The interesting stuff is in
This is built on top of
mark_task_in_drift2 so should merge smoothly with master very soon.