job_run: trap errors moving jobs into active state

If two process attempt to run or fetch the same job simultaneously,
the second process is supposed to encounter an error when it tries
to set the state of the job.  This error should be trapped and
not written to the database in order to allow the first process
to complete successfully.

(The alternative would be to select a job and set it to an active
state within a single database lock context.)