Parallelization of iterate_pairs_half and iterate_all

Handlers now have to watch out for critical sections (e.g. file writing)!