db: Add generic workqueue store
Created by: efritz
This starts the effort on https://github.com/sourcegraph/sourcegraph/issues/11786.
This extracts the db layer used by the codeintel worker and indexer to dequeue jobs from postgres. The dequeue processor will also be made generic and added to this package so that it can be adapted for other background/scheduled job use cases.