Jconnor 959031 968524 scheduler bugs

Fixes for bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=959031
https://bugzilla.redhat.com/show_bug.cgi?id=968524

NOTE: it's probably best to look at the scheduler.py file directly instead of trying comment on the diff, which is scary, long, and contains updates to everything, including the copyright, license, comments, and docstrings