Split scheduler.cpp into more files

Signed-off-by: Rodrigo Belem <rodrigo.belem@gmail.com>