Improve stream close and reset

Fixes issue where finish flag gets incorrectly set when a new stream sets the finish flag

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Merge pull request #14 from dmcgowan/stream_close_reset

Improve stream close and reset