Implemented Collection::stopWhen()

This is useful when using collections for processing large files or infinite iterators/generators.

For example, a collection could be used to process values from a `yield` generator with no bound condition to it (like a stream of data). This allows the iterator to stop yielding results until certain condition is met.