Send latest payload info for job end notification

Send notification on change in job status
Fixes #RM196 and #RM3043
The payload sent had old job information.
It should be updated when a job is updated.
We need to track the status of jobs.
This patch takes care of sending a notification
whenever there is a update on job and an actual change in
status.
Also ensure that the latest job is sent in the payload
Fixed some pep8 errors.
Merge pull request #272 from sridevikoushik31/payload

Send latest payload info for job end notification