bgs: ensure output channel is closed if it isn't sub.output (#1066)
The issue here is that when a cursor is supplied, sub.output isn't
actually the channel which is passed along to calling code; the 'out'
chan is what gets returned.
This means that sub.output getting closed needs to be wired through to
'out' getting closed as well.
NOTE: this is in old relay code ("BGS"). If we like this fix, should
copy it to new relay code (`indigo:cmd/relay/stream`) before merging.