Ross Barkley scored a superb late free-kick as Everton won 2-1 at Swansea to return to the Premier League's top four.