backend: move initial createrepo check from dispatcher to worker
Previously we faced concurrency issues between post-build copr-repo runs
and these pre-build copr-repo runs. The pre-build copr-repo could hit
the small time window when 'repodata' don't exist when craterepo_c is
run (moving .repodata to repodata) and start running our own 'copr-repo'
process mistakenly. That would be a long-running process (full
createrepo_c run, without --recycle-pkglist), and more, would be blocked
by other concurrent copr-repo processes (so it would be eventually
killed by timeout -> the build would continue -> and it would fail
anyways - regardless of the actual mock results, issue #1222). This
race should be closed now.
Also, stop running copr-repo before build is started (again), and "only"
wait till the repodata become available (and fail if they won't, after
certain time period). We used to have problems with this approach
before -- but we did not fail the builds, but rather kept waiting
indefinitely. Neither approach is ideal, but with the current approach
we should better motivate people to report issues.
Also move the logic out from BuildDispatcher to Worker so we never block
other builds by those checks.
Fixes: #1222