Tens of thousands gathered in Beirut to mourn the group’s former leader, as its new chief vowed to keep fighting Israel.