flushMicrotasks and flushTimers

Sounds good. I'll add periodic timer flushing. I guess I don't use periodic timers enough :)