Emit 'close' events when query completes

Consider a system where one component is scheduling tasks that yield
streams, and passing them to (unknown) clients for consumption.

It would be useful for the scheduler to know that the query
underlying the stream is completed (so it can continue on to it's
next task) without having to wait for the consumer to finish reading
all results.
Merge pull request #1 from grncdr/patch-1

Emit 'close' events when query completes