Return JID and error when queueing.

The JID may be an interesting information to keep, for the application
requesting the job, there is currently no way to get it before task
execution by a worker