Fix index work

Urgh, daemon_work_done wants to sync() which wants to get locks which is
way too much contention for the threads.

So, instead, do the call when the threads are reaped.