Fixes #771: Makes the ProgressBar usable as a generator.
Merge pull request #771 from mdboom/utils/progress-bar-generator

Make generator version of ProgressBar