Added a TestScheduler which collects actions in a queue and has
adjustable time.