pthreadpool: Undo put_job when returning error