Alfie Devine scored twice as Preston ended a seven-game winless streak with a 3-1 Championship victory over Stoke at Deepdale.