stream.end() should also clear the flush interval.
make test more clear
Merge pull request #4 from threeday0905/bugfix/interval-legacy

stream.end() should also clear the flush interval.