Sam Curran took five wickets for the first time in his career as England defeated Sri Lanka in the second ODI at The Oval.