Implement a periodic task scheduler, and a basic dormant mode
This is a revised version of !397 (closed); it implements a scheduling system for periodic tasks that can be externally controlled, and then uses the external control aspect to implement a basic dormant mode (#90).
More technically, the scheduling system consists of a Stream
that
periodic tasks are expected to embed in a while
loop or similar, a
way for tasks themselves to choose how long to wait until the stream
next yields a result, and a handle to control this outside of the task.