Add DeadlineScheduler and test
Make thread start/stop thread-safe
Merge branch 'f/add-deadlinescheduler' into develop