Sets and executes timeouts set during a tick.

Timeouts and intervals set from within a timeout/interval would be
scheduled to run after the current DelayedFunctionScheduler tick.

Run-at-times were shifted because tick would increment the currentTime
before executing scheduled functions. Execution looped over an array of
tunctions-to-run created from schedule. Any changes to schedule would be
ignored during the tick, and the next tick would ignore any functions
which should have been executed in the past.

The commit is a rewrite of DelayedFunctionScheduler, preserving the
public interface. Execution updates currentTime on each iteration, and
each time takes the 'youngest' functions from the schedule that aren't
after endTime.