Fixed a cvd publish issue

During the CVD publish we needed to wait till package groups and
errata were copied to the cloned repo before doing the
"purge_empty" operation. This is because "copy" is an async operation in
pulp.
Merge pull request #3107 from parthaa/publish-wait

Fixed a cvd publish issue