perf: chunk bulk inserts during backfill and bump heap to 512MB
Inserts records in batches of 1000 instead of collecting all records
for a repo before inserting. Moves DELETE before insert loop so
chunked inserts work correctly. Bumps max-old-space-size to 512.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>