dominictarr/through — pull request #3 by jeffbski (2012-11-20 14:38:58+00:00)
Title: Ensure that end will be queued if paused with data

Fix defect where end is not emitted with a buffering stream
when it is paused and has data in the buffer when it ends.

The `end()` method was only invoking `_end()` if the buffer
was empty, however `_end()` calls the user provided end fn
which is where the `queue(null)` would be called.

So if the stream is paused and there is data in the buffer
when `end()` is called, `queue(null)` (from the user end fn)
never gets invoked.

Change code to always call `_end()` regardless of buffer
length since it will simply `queue(null)` assuming user provided
proper buffer end fn.