Change os_write_schedule to be os_cache_dirty_max, changing a boolean
(schedule writes for each buffer after it's written) into a value
(schedule writes for all dirty buffers after enough bytes have been
written).