Move db helpers to internal/db
Created by: asdine
This PR moves the FakeClock type to the internal/db/dbtesting
package and adds some stub generators to the internal/db
package.
These functions will be used in subsequent PRs for simplifying the repo updater store.