cleanup(pubsub): make some examples more readable (#6061)
cleanup(pubsub): make some examples more readable (#6061)

Making the integration tests reliable requires verifying that
subscribers actually receive events and that they shutdown properly. We
were weaving the code to do this in the middle of the example, which was
not very readable. Now the code surrounds the example (with some
refactoring), but does not appear in the extracted Doxygen or the cloud
site examples.
googleapis/google-cloud-cpp,googleapis/google-cloud-cpp,googleapis/google-cloud-cpp,googleapis/google-cloud-cpp