all: Move DB helpers into pkg/postgres

Signed-off-by: Lewis Marshall <lewis@lmars.net>
Merge pull request #557 from flynn/pkg-postgres-helpers

all: Move DB helpers into pkg/postgres