This takes advantage of generics, and generally clears up a lot of
inconsistencies and quality-of-life issues.
Start of db rework: clean up, start generics, improve tests
Write some nice aspirational package docs
Rework and document the db API
Tests still pass, at least...now for everything else
Update all callsites of db functions
Finish converting all callsites
Not too bad actually! Centralizing access into the helpers makes a big
difference.
wtf it works