There was a dup.
Now detects dup changes, and removes them before inserting the (hopefully
newer, updated) new change.
Now flushes to the database every 1,000 changes only (should optimize
access to disk).