Scheduler code style cleanup.

Some cleanup I did while I was working on SPARK-829. Please merge SPARK-829 first.

 I gotta run now so let's use Jenkins for the unit test run.