Put database updating into a separate thread, which makes things orders of magnitude faster; previously database updates were done per-report.