* feat(db): error table updating function
Add a function for updating the error table (to be used for syncing the
repo contents to the database).
* feat(db): add function to delete unused error codes
Add a DB function to delete any unused error codes (actually a soft
delete due to a rule on the content.error table). This allows syncing
the repo state to the DB state by removing any entries that have been
removed from the repo.