Current scheduler and I/O work

r?

This rolls up my previous, unmerged pull request along with the last week's work. There is a lot of miscellaneous stuff here. Most of the issues that prevented the last pull from merging are resolved, but there is still a somewhat rare deadlock on mac that I'm hoping won't be too obnoxious if this lands. Still investigating.