hydra-queue-runner: --build-one: correctly handle a cached build

Previously, the build ID would never flow through channels which exited.

This patch tracks the buildOne state as part of State and exits avoids waiting forever for new work.

The code around buildOnly is a bit rough, making this a bit weird to implement but since it is only used for testing the value of improving it on its own is a bit questionable.

Created by  Graham Christensen  on March 16, 2021
SSOJX6VZ5J2CKZHCBOWMIOVPOD2KLAJQBAEH74Q3EYAXXTTX625QC
Change contents