Prime Minister Narendra Modi’s party led by a large margin in two important state elections where votes were counted on Sunday, substantially expanding the Bharatiya Janata Party’s territory and opening the door to future control of the upper house of Parliament.