func (o ObservableFoo) AutoUnsubscribe() ObservableFoo {
	observable := func(observe FooObserver, subscribeOn Scheduler, subscriber Subscriber) {
		subscriber = subscriber.Add()
		observer := func(next foo, err error, done bool) {
			observe(next, err, done)
			if done {
				subscriber.Unsubscribe()
			}
		}
		o(observer, subscribeOn, subscriber)
	}
	return observable
}
jig:template Observable<Foo> AutoUnsubscribe<Foo>
AutoUnsubscribe will automatically unsubscribe from the source when it signals it is done.
This Operator subscribes to the source Observable using a separate subscriber. When the source
observable subsequently signals it is done, the separate subscriber will be Unsubscribed.
package rx
import (
	"fmt"
	"sync/atomic"
	"github.com/reactivego/scheduler"
	"github.com/reactivego/subscriber"
)
type Subscription = subscriber.Subscription
type Subscriber = subscriber.Subscriber
func NewSubscriber() Subscriber {
	return subscriber.New()
}