Huang abruptly quit on Thursday as head of one of the world’s most valuable companies after revelations of alleged extramarital affairs.