Fix exception in status admin command

If a job was enqueued for a function before it was registered,
an exception could occur.  Also, fix some related potential race
conditions.

Change-Id: Id6d4569bed6cd51dc4f1698184c54a0cb343fb0d