tm_timer: Fix early timeouts.

Maintain the invariant that last_time + timers_head->time is the time
of the next item in the queue throughout tm_timer_callback for when
JS callbacks call setTimeout.