add ticker object

returns a new Ticker containing a channel that will send the time with a period
specified by the duration argument.

It adjusts the intervals or drops ticks to make up for slow receivers.  The
duration d must be greater than zero.

In the process fix the timer and the way the scheduler can exit when no active
coroutine can be used.