Simplify SequenceOf.takeWhile implementation

Takes advantage of GeneratorOf, removing an unnecessary class. Also
fixes a bug where TakeWhileSequence could continue to take elements
from parent sequence even after the condition was no longer met.