Just as steam gave way to diesel last century, now a revolution is under way in how to power the railways of the future.