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.
That is my understanding as well, although I wondered why the `if (!isUnsubscribed())` was here in the actual source code.

Shall I update the PR with your proposed changes, or do you want to do it yourself?