3988: Update crunch-job, arv-run-pipeline-instance and workbench to read/write
"state" field of jobs instead of using running/success (+
cancelled_at/started_at/finished_at) to figure out what state the job is in.
3988: look at job state instead of cancelled_at to determine if the job should
be stopped.
3899: Fix syntax errors in arv-run-pipeline-instance, and update job record if
job is queued or running.
Merge remote-tracking branch 'origin/master' into 3988-crunch-use-job-state
3899: crunch-dispatch uses state column to mark crashed jobs as failed.
3988: Job.queue uses "state = Queued" instead of previous multi-column-null test.
3899: Shorten count of ended/succeed/failed in a-r-p-i with some clever Ruby.
Improve reporting to test for state == Cancelled instead of looking at
cancelled_at, and distinguish between cancelled the state being unexpectedly
changed to success/failed.  pipeline_instances_helper uses state attribute.
3988: Add note to Job.state.  Replace logic to compute state based on
success/running columns with the same logic as used on apiserver.
3899: Set :state in pipeline_instance_helper.rb and remove Job::state.
3899: jobs_controller uses state = Queued instead of multiple state columns.
Updated fixture so that tests pass.
Merge remote-tracking branch 'origin/master' into 3899-crunch-use-job-state
3899: pipeline_instances_helper: Don't set :state if it's already set.  Add newline to jobs.yml.
3899: Uncomment line that was commented out for debugging and committed by mistake.
Merge branch '3899-crunch-use-job-state' closes #3899