Benson Henderson had to sweat through a narrow verdict on the scorecards to retain the Ultimate Fighting Championship lightweight crown.