Reorganize the scheduler so that it halts when idle.
Reorganize the scheduler so that it halts when idle.

AugustusHuang/Mezzano,froggey/Mezzano,rvedam/Mezzano,rvedam/Mezzano,froggey/Mezzano,AugustusHuang/Mezzano,varjagg/Mezzano,varjagg/Mezzano