[container_registry] fix: fix broken test [(#3436)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3436)
[container_registry] fix: fix broken test [(#3436)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3436)

* [container_registry] fix: fix broken test

fixes #3435

* Use Pub/Sub message receiver that can notify main thread
  when it has received expected number of messages.
* Only test one single occurence.
* Use uuid4 wherever makes sense.
* test if Pub/Sub client receives at least one message
googleapis/python-containeranalysis,googleapis/python-containeranalysis