Properly close and join multiprocessing.Pool to make coverage work in multiprocessing.

Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
3 jobs for enhancement/migrate_to_pytest in 4 minutes and 55 seconds (queued for 2 minutes and 22 seconds)