implements send job_error_occurred notification

When an ERROR scenario occurs while processing a job, we generally
update the job status and its timeout using worker.client.update_job()
method. But currently there is no notifications sent for the error
occurred.
This patch includes the sending of ERROR notification along
with updating of job status as similar to other job processing
notifications.
implementation includes:
- introduce a snapshot._job_error_occurred() to update the job status
  and send appropriate notification on ERROR
- modify worker.process_job() exception handling logic to update the job
  status and send job ERROR notification
- include the error message as part of the notification payload
- add more/modify tests for testing send error notification impl.
implements qonos.job.failed notification

- qonos.job.failed notification is sent only if the following criteria
  is satisfied.
  - If the job status is updated to CANCELLED
    OR
  - If the job status is updated to ERROR (AND)
    if the number of retries exceeds the max retry count (OR) if the
     current time exceeds the  hard_timeout.
- qonos.job.failed notification includes the error message to the job
  payload if it is available while updating the job status.
- modified existing tests to test the send qonos.job.failed notification
  scenario.
Removing unused function _is_active_status

The function _is_active_status is unused
Merge pull request #312 from broble/rm3229-unusedfunction

Removing unused function _is_active_status
Merge pull request #305 from venkateshsampath/qonos_job_failed_notification

implements qonos.job.failed notification
Merge pull request #304 from venkateshsampath/job_error_occurred_notification

implements send job_error_occurred notification
introduce new job state, HARD_TIMED_OUT.

Currently, when a job hard times out, we do not update the status to
denote that the job has failed and hence there is no way to send a
job.failed notification for hard timed out jobs.
With this patch we introduce a new job state (HARD_TIMED_OUT) and based
on this new job state a job.failed notification is sent for the hard
timed out jobs.

Implementation Details:
- introduce a new job state - HARD_TIMED_OUT
- remove the filter for ignoring the hard_timed_out jobs from db
  call, _job_get_next_by_action
- instead update query criteria to ignore jobs whose status is already
  set to 'HARD_TIMED_OUT'
- implement calls for updating and sending job.failed notification in
  JobProcessor
- include tests for the changes done.
introduce new job state, MAX_RETRIED

Currently, when a job's retry_count reaches/exceeds max_retry count, we
do not update the job status to denote that the job has failed. As a
result there is no way to send job.failed notification.

This patch addresses the issue by introducing a new job status,
'MAX_RETRIED' which will get updated whenever a job's retry_count
reaches/exceeds max_retry.
Some of the key changes done as part of the patch are as follows:
- moved the config param 'max_retry' from qonos-api.conf to
  qonos-worker.conf.
- made the job processor on qonos-worker responsible for validating the
  max_retry count and based on that update the job status
- made changes to the '_job_get_next_by_action' query to ignore jobs
  whose status are set to 'MAX_RETRIED' and also removed the criteria
that checks if the job's retry_count is lesser than max_retry
- removed the job.failed notification logic from qonos.api.jobs.
- made the job.failed notification for 'MAX_RETRIED' to be sent by
  qonos-worker.