Ashley Barnes scores his first goal in more than a year as Burnley beat Wolves to move clear of the Premier League relegation zone.