db-update: Empty arrays each iteration
This broke db-update for more than one repo at a time. Most importantly,
because the pkgkeys
array kept accumulating keys, we created bogus
copies of state repo entries, "releasing" packages into multiple repos.