Issue refs #1678: implement postgresql-based work queue, tests passed