3859: Implement Job lock method on api server.  This takes a queued job and
uses a transaction to set it as running without creating a race condition.
3859: Removed validate state change (not the fight with crunch-job)
3859: Check crunch-job return code properly.  Restore job state change
validation.
Setting running = false is ok for successful jobs, so take out extra exit_code == 0 check.
Merge branch 'master' into 3859-api-job-lock-method

Conflicts:
	services/api/script/crunch-dispatch.rb
3859: Cleaned up validate_state_change.  Added unit test for job locking.
Merge branch 'master' into 3859-api-job-lock-method
3859: Add functional test for locking and fix tests broken by validate_state_change.
3859: Added AlreadyLockedError for job lock conflict.  Added runningbarbaz
fixture so test "cancel someone else's visible job" is testing the right thing.
3859: unit test for job state changes
Merge branch '3859-api-job-lock-method' refs #3859