Indian Prime Minister Narendra Modi looked poised to secure a rare third term and declared victory on Tuesday evening, calling it “a historical feat in India’s history” — even though his party appeared likely to lose a significant number of seats, falling shy of an outright majority.