Dwight Gayle's brace confirms Crystal Palace will be in the Premier League next season after a 2-1 victory over Stoke.