Developing modular thread scheduling

- Moving lot of code from tiny scheduler under generic threading
  support
- Created a new CDS scheduler