Only autohold failed builds

We have discovered that in a gate reseting situation we will autohold
aborted builds. This is problematic because we want to hold the failed
jobs that cause the gate to reset. This appears to happen because we
don't explicitly check the build status before holding and instead hold
any build that has completed and has an auto hold request.

Change the behavior to only hold failing jobs.

Change-Id: I93a68ea8dbf87d10ea3e5a35ccaf421dd4d15875
3 files changed