Sunderland beat fellow strugglers Stoke 1-0 at the Stadium of Light to climb out of the Premier League relegation zone.