tko/autotest-db-delete-job: Do a better job handling MySQL errors

When trying to delete a job from the db, sometimes all
conditions for it to be deleted may not be fulfilled.
This usually happens when the job that the user tried
to delete was still on the scheduler queue, see issue #656.

So handle exceptions that might happen during the operation,
and try to make an educated guess about what happened
and how the user can work around the problem.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>