3898: db migration to add state attribute to job.
3898: add unit test for job state attribute
Merge branch 'master' into 3898-job-state-attr
3898: set finished_at if nil when success is changed.
3898: if state is changed to Running and is_locked_by_uuid is nil, return validation error.
3898: couple more test assertions
3898: look for success before running.
3898: cancelled_at takes precedence over success flag.
Merge branch 'master' into 3898-job-state-attr

Conflicts:
	services/api/db/structure.sql
Merge branch 'master' into 3898-job-state-attr
closes #3898
Merge branch '3898-job-state-attr'