SERFLOW: A Cross-Service Cost Optimization Framework for SLO-Aware Dynamic ML Inference