Burnley reduced the gap to the Championship’s top two to two points with a much-needed victory against Sheffield Wednesday.