India’s ruling alliance, led by the Bharatiya Janata Party (BJP), won a historic third consecutive term, even as the party lost its decade-old majority in an underwhelming victory for Prime Minister Narendra Modi.