jobqueue: avoid exceptions due to races in redis job listing functions

* Also improved MappedIterator to allow for an accept() closure.

Change-Id: I614dc6e98b5c6297f3efc7a0004fbabd19624915
(cherry picked from commit 4ace725b4e12090d4bd5d18059d942e0ce97a063)