Risk-Based Optimal Scheduling for the Predictive Maintenance of Railway Infrastructure