Gearpump resource scheduler

extract scheduler implementation and abstract resource respresentation
MasterToScheduler  are internal event to Master. Should not be listed here.

SchedulerToWorker  actually is a MasterToWorker event. Please move it to object MasterToWorker.