Almost Sure Asymptotic Optimality for Online Routing and Machine Scheduling Problems