Refactored process.ml.

Signed-off-by: Jerome Maloberti <jmaloberti@gmail.com>
Extracted scheduler.ml from process.ml.

Signed-off-by: Jerome Maloberti <jmaloberti@gmail.com>
More refactoring of the scheduling.

Signed-off-by: Jerome Maloberti <jmaloberti@gmail.com>