Allow use of the returned subscription to cancel periodic scheduling

The documentation for schedulePeriodically indicates that the returned
subscription can be used to unsubscribe from the periodic action, or to
unschedule it if it has not been scheduled yet. That was the case only
before the first action took place, and it was then impossible to
unsubscribe using the given subscription, although unsubscribing the
worker did work.

This fixes #1344.
I thought about this double-check for a minute; if the worker is unsubscribed, it may or may not happen before or after these checks in general, and if so, the next call to schedule won't do anything anyway. I.e., such eagerness is not really necessary here.