simplify pending/scheduling logic

previously if an atc died after scheduling a pending build, it could not
converge on the build running, as GetNextPendingBuild only considered
non-scheduled builds.