Fix panic for sending to closed channel in mongo tail

Make sure we wait for iterator to close before returning.
The defer func will close opc and we would get a panic if still sending
operations to it.