Fix Stream bugs and add more composing tests

Fix Stream.take_while looping infinitely when given lazy stream.
Fix Stream.take and Stream.take_while calling fun one extra time.
Add more tests where Stream functions are given streams.
Merge pull request #1521 from ericmj/stream-fixes

Fix Stream bugs and add more composing tests