[scheduling] Finish integrating cost model into flow scheduler.