Learning to Solve Combinatorial Optimization Problems on Real-World Graphs in Linear Time